Progress Programmer Progress Programmer - 1 year ago 157
Java Question

JAVA_HOME directory in Linux

Is there any linux command I could use to find out

directory? I've tried print out the environment variables ("env") but I can't find the directory.

Answer Source

echo $JAVA_HOME will print the value if it's set. However, if you didn't set it manually in your startup scripts, it probably isn't set.

If you try which java and it doesn't find anything, Java may not be installed on your machine, or at least isn't in your path. Depending on which Linux distribution you have and whether or not you have root access, you can go to to download the version you need. Then, you can set JAVA_HOME to point to this directory. Remember, that this is just a convention and shouldn't be used to determine if java is installed or not.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download