• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to define JAVA_HOME and similar sys variable in linux ?  RSS feed

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post
How i can define java_home variable in linux ?
I want to do somethong like windows environment does about defining variables , does linux has a gui for configuring path/ classpath /system varables?

is it a wise decision to use linux as development platform ? I saw that many people know to develop and test in both linux and windows ,so iwant to learn this ability.

is it really required to learn and use both linux and windows ?

thanks
 
Sanjaya Sugiarto
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on which Linux you are using...

In the moment see: http://forum.java.sun.com/thread.jspa?threadID=214284&messageID=738475
[ October 26, 2006: Message edited by: Sanjaya Sugiarto ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sanjaya Sugiarto:
It depends on which Linux you are using...

In the moment see: http://forum.java.sun.com/thread.jspa?threadID=214284&messageID=738475


No, not on which Linux you're using, but on what command shell you're using. If you're on Linux, and you are at the level of asking this question, you're using "bash", the default.
 
Mahendra Shelke
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the Env and Sys variable resides in .bashrc or .bash_profile files in your root directory.
If you are using any other shell then the files name would be accordingly changed.

just edit .bashrc file with vi and gedit and make the following entries for JAVA_HOME or PATH variable.

Note : Dont forget to change the jdk path.

export JAVA_HOME=/usr/java/jdk1.5.0_08
export PATH=$PATH:/usr/java/jdk1.5.0_08/bin
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mahendra Shelke:
[QB]All the Env and Sys variable resides in .bashrc or .bash_profile files in your root directory.


You mean "in your home directory", don't you?

Else he could try /etc/bashrc, /etc/profile, /etc/environment for sytem-wide definitions, but that's depending on distribution, version and shell you're using.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!