Installing and Running JAVA on x86 and x64 Debian-based machines

30 07 2009

In this post, I’ll teach you how to install and run JAVA applications under Debian and Debian-based machines (like Ubuntu, Xubuntu, Edubuntu, etc…). The post will be divided in two parts: one for the x86 architecture (32 bits) and the other for the x64 architecture. There’s also a useful list of commands for both architectures. All commands must be performed as root.

x86 architecture (32-bit):

Remove unnecessary packets:

sudo apt-get remove icedtea-gcjwebplugin

Install Java:

sudo apt-get -y install sun-java6-bin sun-java6-fonts sun-java6-jre sun-java6-plugin

Reinstall Java (if already installed):

sudo update-alternatives –config java

x64 architecture (64-bit):

Install Java:

sudo aptitude install sun-java6-jre sun-java6-plugin sun-java6-fonts

Both Architectures:

Check default java version:

java -version

Check existing Java instalations (different versions):

sudo update-java-alternatives -l

Set Default Java Instalation to be used (replace XXXX with the java version found in the previous command):

sudo update-java-alternatives -s XXXX

or (interactive way)

sudo update-alternatives –config java




Leave a Reply

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

You are commenting using your 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: