Startup Script
Hello again...
I still can't set the JAVA_HOME. When I 'ls' the /etc in the terminal as root, the 'profile' is not a directory. There's a 'profile.d' directory though. Are they the same? I tried in bash and tcsh shell, both can't work.
Instead of unpacking in /usr/local (I did that too, I tried /etc/rc.d/init.d also.
[root@localhost /]# cd/etc/rc.d/init.d
[root@localhost init.d]# chmod +x j2sdk-1_4_1_05-linux-i586.bin
[root@localhost init.d]#./j2sdk-1_4_1_05-linux-i586.bin
[root@localhost init.d]# /etc/rc.d/init.d/j2sdk1.4.1_05/bin/java -version
java version "1.4.1_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_05-b01)
Java HotSpot(TM) Client VM (build 1.4.1_05-b01, mixed mode)
When I #which java and #which javac, it returns no java and javac.
Ok, now I set the path.
[root@localhost init.d]# PATH="$PATH:/etc/rc.d/init.d/j2sdk1.4.1_05/bin:." export PATH
i test the path i set just now, and which java and which javac, all is ok. But when I close the terminal and open a new one, it's gone! The set path command was suppose to be set in /etc/profile, but as there's no such directory, I set it in /etc/rc.d/init.d
There's no '~/.bashrc' or bash_profile thing anywhere. I did all of that in terminal. If I access through the desktop, I can find the profile and bashrc but they are normal files not directories.
Please please help me!!!
Thank you.
|