LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Setting java path for normal user (http://www.linuxquestions.org/questions/linux-software-2/setting-java-path-for-normal-user-71063/)

bruce64 07-08-2003 03:46 PM

Setting java path for normal user
 
Good afternoon everyone,
I have set java up as a root user and have run some simple java programs. However, when I return to a regular user I can no longer run java programs. Where should I set the path? I know I am supposed to edit the bash profile but I'm not sure where in the file I should put the information. Thanks in advance for your replies!

Bruce

Tinkster 07-08-2003 04:07 PM

Put a file named java.sh that sets the
paths into /etc/profile.d

Cheers,
Tink

jpbarto 07-08-2003 04:07 PM

in your .bash_profile file add the following lines

** NOTE: the following assumes that Java is installed in /usr/local/j2sdk1.4 **

JAVA_HOME=/usr/local/j2sdk1.4
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:./

export JAVA_HOME PATH CLASSPATH

if java is installed somewhere other than /usr/local/j2sdk1.4 simply change the value of JAVA_HOME

after you make these changes to .bash_profile logout and log back in. problem should be solved.


All times are GMT -5. The time now is 03:19 PM.