java 7 on debian 6.0 not working usr/bin/java no such file or directory

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??

Borja Gorriz

Posted 2013-10-09T11:19:33.663

Reputation: 13

Answers

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)

Savvas Radevic

Posted 2013-10-09T11:19:33.663

Reputation: 1 056

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. – Borja Gorriz – 2013-10-09T15:15:24.747

prefer version 7, I think it's more compatible with oracle java 7 – Savvas Radevic – 2013-10-11T09:06:38.840