After I wrote the previous post, I found out I should not have configured Java like that. So after following some tips from the comments and from “Installing Sun’s Java environment in Debian systems” here is a better way to do it:
- Go Repositories/Ubuntu where you will find information on how to add the “Universe” repository.
- Open your Synaptic Package Manager and search for java-package. Mark for install and apply.
- After downloading the JDK bin file, go to a terminal and type
- make-jpkg jre-1_5_0_03-linux-i586.bin
- sudo dpkg -i sun-j2sdk1.5_1.5.0+update09_i386.deb
- sudo update-alternatives –config java (here choose the one that points to the JDK you installed)
- sudo update-alternatives –config javac
This is a better way since it will take care of the system variables for every user (you can verify that java and javac are working on the console) and it will be easier to manage updates.
If you’re using Eclipse you need to update the Installed JREs in Window->Preferences->Java and add a new one that points to /usr/lib/j2sdk1.5-sun/ e.g..