Search This Blog

Saturday, September 20, 2008

Installing JDK 1.5.0_15 on Damn Small Linux - Not

This actually is a no brainer, any one can do it, but still i thought i would right it down, may be a reference for me, to remember what i did. It was pretty much same as how you do it in rest of the linux distros, no exceptions.

First i went to sun's website and downloaded the .bin installation file. (not the rpm one). since i wanted to install in a place from where i can access it for all users. i became root. then i copied the .bin file to /usr/local, then enabled executable permissions to it and then executed the file. that is it. it got installed into /usr/local/jdk1.5.0_15.. I will list the exact steps which i had done.

$su
$cp /home/dsl/jdk-1_5_0_15-linux-i586.bin /usr/local/
$cd /usr/local
$chmod a+x jdk-1_5_0_15-linux-i586.bin
$./jdk-1_5_0_15-linux-i586.bin

after this, i logged in to another terminal and edited the .bashrc file to set the java_home and path variables, so as to access the commands directly in command prompt.

in terminal enter
$cd
$vi .bashrc
(or)
$vi .bash_profile

then at the end of the file add the following lines.

export JAVA_HOME=/usr/local/jdk1.5.0_15
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/lib

save the file and exit, and do a machine restart(it should work if you open another terminal and check, but all failed and only a reboot worked in my case).....

No comments:

Post a Comment