Search code examples
javaenvironmentlinux-mint

webupd8 JAVA_HOME not set after installing oracle-java8-set-default


I'm following this link to install Oracle Java 8.

Maybe I got this wrong, but I suppose JAVA_HOME should be set after installing oracle-java8-set-default.

If I echo $JAVA_HOME or printenv | grep -i java nothing comes up. I'm using Linux Mint 17.1 (Rebecca)

Thanks!


Solution

  • Your JAVA_HOME will not be set by the webupd8 method, and you don't normally need it (because the update-java-alternatives script manages the environment). If you're looking for the folder it's under "/usr/lib/jvm" and you can certainly do

    export JAVA_HOME=/usr/lib/jvm/java-8-oracle
    

    and you can also test which Java is active with

    java -version
    

    or

    java -fullversion