Please help! I still can not set JAVA path
I have searched many thread and followed the instruction:
I installed the JAVA2SE in usr/java/j2sdk1.4.2_01 so I gedit .bash_profile add :/usr/java/j2sdk1.4.2_01/bin to the end of PATH can not work and tried gedit .bashrc add export PATH = $PATH:/usr/java/j2sdk1.4.2_01/bin also can not help me to type java(in /home/preswang) to run. I confused, does anyone help me, please....! in /usr/java/j2sdk1.4.2_01/bin type ./java it runs |
you could try to pathmunge it globally by editing /etc/profile.
Code:
# Path manipulation if this doesn't work, you may have to logout/login ( or reboot.... :scratch: ). |
I have tried to put $PATH=$PATH:/usr/java/j2sdk1.4.2_01/bin in the /etc/profile
can not work! and do what you told me to do, also fail. I restart my laptop now! |
After reboot, it works :) But I am confuse now that LINUX need reboot to set PATH ?
|
It has to read /etc/profile to set the new path. If you opened up a new shell you would have seen the changes take effect.
|
if i open up a new shell it doesn't seem to work either, tried to reboot as well, same thing.. no fireworks :( any suggestions?
|
what exactly did you do? type in a shell terminal:
java -version if you get a java version output, then java is installed and the path is fine. if you get something like command not found, then you need to trace what you did. how did you install java? did you use the rpm from sun's java website? did you make sure that you didn't make any typos when setting/exporting the path to the java installation directory? need to know what you did. |
:) wrong version in profile, 1.4.1 instead of 1.4.2 :)
thanks megaspaz :) |
Quote:
If a profile (shell login) script was updated, type "source /etc/profile" to execute the script again in your current shell. |
:) much thanks! it was already running! no scripts needed! it boots on startup! thats why it wouldn't let me start up a server (it was already running) :)
thanks again to everyone! i'm now running through a tutorial! if anyone else wants the link to this very good tutorial! just let me know and i'll post it up!! |
All times are GMT -5. The time now is 09:10 AM. |