user959129
user959129

Reputation:

Installing java on ubuntu... what is my java home?

I use the below to install java on Ubuntu. What should my JAVA_HOME be:

sudo apt-get -y install openjdk-6-jdk openjdk-6-jre

e.g. JAVE_HOME=?

Thanks

Upvotes: 4

Views: 4072

Answers (5)

Tim Guo
Tim Guo

Reputation: 98

Try /usr/lib/jvm/java-6-openjdk-amd64/. It works for me.

Upvotes: 1

Pih
Pih

Reputation: 2278

do the command:

which java

probably will return /usr/bin/java that is a link to /etc/alternatives/java which is another link to (probably) /usr/local/jvm/java-6-sub/jre/bin/java , so, your *JAVA_HOME* is/should be set to /usr/local/jvm/java-6-sub/jre

Upvotes: 2

Alex Calugarescu
Alex Calugarescu

Reputation: 848

Type : "echo $JAV" and then hit tab for auto-complete. Then hit enter. If the path variable does not exist use : "whereis java" or "find / -iname "java" 2>/dev/null"

Upvotes: 0

Alberto Zaccagni
Alberto Zaccagni

Reputation: 31560

Look in /usr/lib/jvm it should be there.

Upvotes: 0

npinti
npinti

Reputation: 52185

This is how it is set up on mine:

/usr/lib/jvm/java-6-sun-1.6.0.26

You can check using the command

whereis jvm

Upvotes: 5

Related Questions