Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Set JAVA_HOME variable permanently

  • 06-08-2014 07:19PM
    #1
    Registered Users, Registered Users 2 Posts: 14,833 ✭✭✭✭


    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, Registered Users 2 Posts: 5,117 ✭✭✭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,338 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