Tuesday, September 2, 2008

Setup java for CentOS 5

Download needed java distributive.
If you want to have two jvm for i386 and x64 you have to download non rpm package.

1. login by root user
2. go to /usr/java/
3. run jdk-XXX-linux-XXX.bin
4. add symbolic links determining default jvm by using command alternatives

e.g.

/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.5.0_16_x64/bin/java 3


4.choose default by using command alternatives
e.g.

/usr/sbin/alternatives --config java


e.g.

[root@localhost jdk1.5.0_16_x64]# /usr/sbin/alternatives --config java

There are 3 programs which provide 'java'.

Selection Command
-----------------------------------------------
* 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
+ 2 /usr/java/jdk1.5.0_16/bin/java
3 /usr/java/jdk1.5.0_16_x64/bin/java

Enter to keep the current selection[+], or type selection number: 3


Checking...

[root@localhost jdk1.5.0_16_x64]# java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_16-b02, mixed mode)




Enjoy :)

1 comment:

Anonymous said...

Hi,

When ever I surf on web I never forget to visit this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]You have really contiributed very good info here oipetrenko.blogspot.com. Let me tell you one thing guys, some time we really forget to pay attention towards our health. Let me show you one truth. Research points that nearly 50% of all USA grownups are either chubby or weighty[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] Therefore if you're one of these citizens, you're not alone. Its true that we all can't be like Brad Pitt, Angelina Jolie, Megan Fox, and have sexy and perfect six pack abs. Now next question is how you can achive quick weight loss? [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss[/url] is not like piece of cake. You need to improve some of you daily habbits to achive weight loss in short span of time.

About me: I am blogger of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also health trainer who can help you lose weight quickly. If you do not want to go under painful training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for quick weight loss.