2

I am trying to make Tomcat 7 working with Eclipse, and I am not sure if my JAVA_HOME is correct.

~$ echo $JAVA_HOME 
/usr/lib/jvm/default-java

And there is no such catalog!

I only have:

~$ ls /usr/lib/jvm/
java-1.7.0-openjdk-amd64  java-7-openjdk-amd64

Is my JAVA_HOME correct?

2 Answers 2

0

Your JAVA_HOME setting is fine.

The file /usr/lib/jvm/default-java should be a symlink pointing to the JRE and is provided by the default-jre-headless package. This package is required for a regular Java (default JRE) installation of Java in Ubuntu. Apparently you removed this symlink, removed the individual package or something like that, or, you installed the JRE in an alternative matter.

I'd suggest to make sure you install the JRE again with the specific package as well.

sudo apt-get install default-jre default-jre-headless

And to verify the correct JVM is selected as default Java:

sudo update-alternatives --config java
sudo update-alternatives --config javaws # optional, java web plugin

Then you should be all fine with the default settings.

0

Well I think you almost got it. You can use this command to detect where your jvm is located.

whereis jvm

I have same setting and I believe you can point on either dir in JAVA_HOME as java-1.7.0-openjdk-amd64 is a weak link to other( see man for ln).

Ah and Answer "it is not correct! Take one from pwd command."

You must log in to answer this question.

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