Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Set JAVA_HOME variable permanently

  • 06-08-2014 7:19pm
    #1
    Registered Users Posts: 10,221 ✭✭✭✭


    Hey all,

    This is possibly a stupid question, but is there an easy/quick way to set my JAVA_HOME system variable so that it will apply system wide, all the time? I've downloaded and installed the 1.8.0_11 JDK and want this as the variable, but can't seem to figure out how to set it as the variable across sessions.

    I'm using Ubuntu 14.04 fwiw.

    Cheers. :o


Comments

  • Registered Users Posts: 4,961 ✭✭✭opus


    Don't use Ubuntu but in Ferora I'd put two files in /etc/profile.d called javahome.sh & javahome.csh with the following commands.
    export JAVA_HOME=whatever
    &
    setenv JAVA_HOME whatever

    Presume there's something similar in Ubuntu?


  • Moderators, Technology & Internet Moderators Posts: 1,333 Mod ✭✭✭✭croo


    Yes ubuntu is very similar and what you suggest should work ... there are other possibilities too - OP see these Ubuntu Docs for full details.


Advertisement