Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to set it at startup in Ubuntu. Currently I have to manually set it after starting up.

share|improve this question

closed as off topic by Shane Madden, Ward, voretaq7, Chris S, Holocryptic Jan 24 '12 at 13:54

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

You can add it to the /etc/environment file, making it part of every user's environment.

JAVA_HOME="/usr/lib/jvm/java-6-openjdk/"

To apply this change while the system is still running, use source /etc/environment.

Recommended reading: Enviroment Variables - Ubuntu community documentation.

share|improve this answer
    
Quotes are superfluous. –  user unknown Jan 24 '12 at 11:14
1  
@userunknown quotes aren't necessary, but make it easier for humans to read. –  Chris S Jan 24 '12 at 13:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.