install java in slackware / zenwalk

12 Nov

1. download jdk-6u21-linux-i586.bin atau yang lebih baru

2. install as root
ubs[~]$ su – root
Password:
root[~]# cd /install
root[install]# chmod u+x jdk-6u21-linux-i586.bin
root[install]# ./jdk-6u21-linux-i586.bin
root[install]# mkdir /usr/local/java -p
root[install]# mv jdk1.6.0_21 /usr/local/java/
root[~]# exit

3. test running java
ubs[~]$ cd /usr/local/java/jdk1.6.0_21/bin/
ubs[bin]$ ./java -version
java version “1.6.0_21”
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode, sharing)

4. edit /etc/profile
ubs[~]$ su – root
Password:
root[~]# vi /etc/profile
PATH=$PATH:/usr/local/java/jdk1.6.0_21/bin
export PATH
root[~]# exit

5. test running java
ubs[~]$ java -version
java version “1.6.0_21”
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode, sharing)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: