Java Installation Guide on OpenSUSE Linux

20 March, 2008 at 10:39 4 comments

Just wanna share my experience when I installed Java on OpenSUSE linux. Before I got it, I was very confused. Because when I checked my java -version is like the old version still from OpenSUSE bringing. Follow this instructions.

1. Download java the last version, as example I use jdk-6u5-linux-i586.bin.

2. Open konsole/terminal (Alt+F2+konsole), and login to root.

3. Copy jdk-6u5-linux-i586.bin to /opt folder.

4. Change mode: linux:/home/kirman # chmod +x /opt/jdk-6u5-linux-i586.bin

5. Execute the installer linux:/opt # ./jdk-6u5-linux-i586.bin
When appear the license agreement, press Ctrl+C to finish read, press y and enter. After that you will see new folder as /jdk1.6.0_05 on /opt folder.

6. Check installation java -version. If you see like this
java version “1.5.0_12
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode)

You need to change the path installation. Before it, you need to remove /usr/bin/java by linux:/opt # rm /usr/bin/java. Because the first version java from OpenSUSE linux intallation is saved here.

7. Now we need to make link from your new installation by linux:/opt # ln -s /opt/jdk1.6.0_05/bin/java /usr/bin/java.

8. Check java -version again, if you find like this the installation is right.
linux:/opt # java -version
java version “1.6.0_05″
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
linux:/opt #

9. Now we need to set classpath in order compile from any where. Make a file .bash_profile, as sample java.bash_profile. Write this one to it and safe on home folder, for example /home/kirman folder.
JAVA_HOME=/opt/jdk1.6.0_05
export JAVA_HOME
export PATH=$PATH:$JAVA_HOME/bin

10. Reboot computer and check environtment by
linux:/home/kirman # echo $JAVA_HOME
/opt/jdk-6u5-linux-i586

If the result is like that, so your installation is right.

Advertisements

Entry filed under: java.

Install Eclipse IDE di OpenSUSE Linux Java dengan Eclipse IDE di OpenSUSE

4 Comments Add your own

  • 1. kala  |  11 April, 2008 at 01:36

    Awesome instructions – thank you!
    I had the issue of trying to resolve why after installing the new JDK, when I did “java -version” the older java version kept showing up and so I did a “which java” command and found out it was in /usr/bin and your instructions filled in the holes to make it all work =)

    Reply
  • 2. kirman  |  11 April, 2008 at 01:59

    Thanks for your appreciation.

    Have a nice with your java programming.

    Reply
  • 3. amir  |  9 April, 2009 at 20:47

    Hi,

    Thanks for the instruction,
    It helped me a lot as I had problem setting the Java Home environment variable.

    Reply
  • 4. tedted  |  15 July, 2010 at 16:24

    Halo,

    thank for your instruction.

    is it same instruction for ubuntu?

    Reply

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

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

Blog Stats

  • 50,298 hits

My Twitter

Error: Please make sure the Twitter account is public.


%d bloggers like this: