1

I'm trying to get java 7 installed in my debian machine but somehow it is not working.

when I do java -version always get a :

-bash: /usr/bin/java: No such file or directory

I've followed this instructions :

http://blog.retep.org/2013/04/13/installing-java-7-on-debian-squeeze/

and if I do:

aptitude search java

It is installed

i oracle-java7-installer

Also, the paths are set correctly as I get:

ls -lah /usr/bin/java

lrwxrwxrwx 1 root root 22 Oct 9 12:36 /usr/bin/java -> /etc/alternatives/java

file /etc/alternatives/java

/etc/alternatives/java: symbolic link to `/usr/lib/jvm/java-7-oracle/jre/bin/java'

What could be wrong??

1 Answer 1

0

That website says to also install oracle-java7-set-default, have you installed that package? There probably is a license to accept, where you have to hit the Tab key (to select the "OK"/"I accept" field) and then press Enter

I don't think that you need oracle java 7, you can use the open source OpenJDK Development Kit.

Install the java jdk/jre by installing the default-jre / default-jdk packages:

sudo apt-get install default-jre default-jdk

or specify the v7:

sudo apt-get install openjdk-7-jdk

(you might not need "sudo" in debian if you have enabled the root user)

2
  • thank you, if I choose the openJDK6 then no problem. Anyway, I still woudl like to know why I cannot get the oracle version. And yes, I had the oracle as default. Commented Oct 9, 2013 at 15:15
  • prefer version 7, I think it's more compatible with oracle java 7 Commented Oct 11, 2013 at 9:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .