Click to See Complete Forum and Search --> : Installing jdk1.3 and setting the path right
Marcel2008
02-13-2001, 07:27 PM
Hi!
I just installed the jdk1.3 rpm from java.sun.com
However how do i set the path? when i type in javac, the file cannot be found.
I also could not find where the files have been installed.
Or should i use the source rpm?
I use linux mandrake 7.2 :)
Thanks for the help
The King Ant
02-13-2001, 07:45 PM
I recently had problems with that too....
Type "rpm -qa | grep -i j2" to find out the name of the package you installed, then type "rpm -ql package_name | grep -i javac" to find where the javac program is ("java" should be in the same directory).
You shouldn't have to do anything other than that... but I've heard that you should "export CLASSPATH=.:$CLASSPATH" and "export JAVA_HOME=/usr/java/j2sdk/" (or whatever yours is).
Marcel2008
02-13-2001, 08:15 PM
I did the export thing, but it doesnt seem to work. When i run "java" it cant be found.
Also when i open an other terminal, the path has been restored to default.
Should i edit some file?
I installed the rpm into /usr/java/jdk1.3
Any ideas?
Thanks ;)
Danster
02-13-2001, 08:56 PM
there are 2 commands U'll need 2 issue:
# export JAVA_HOME=/usr/java/jdk1.3
(do not put in the extra slash on the end as was previously suggested) if UR box is i686 (like mine) you'll also need to make a symbolic link or just copy the i386 directory:
[root@sloppy bin]# cp -R i386/ i686/
Give that a try.
The King Ant
02-13-2001, 10:46 PM
You get the error about java not behind found because the executable file "java" is not in your path. There are 2 main ways to fix this:
1) As root, make a symlink in a bin directory to /usr/java/jdk1.3/bin/java Something like "ln -s /usr/java/jdk1.3/bin/java /usr/bin/java" should work.
2) Add /usr/java/jdk1.3/bin to your path, so your shell looks for executables in /usr/java/jdk1.3/bin That's what the "PATH=/usr/java/jdk1.3/bin:$PATH" line does. To make this permanent, you can put it in your ~/.bash_profile file. Or, to make it apply to all users, you can put it in your /etc/profile file.