Sun Java SDK on Ubuntu or Debian
Automated disclaimer: This post was written more than 15 years ago and I may not have looked at it since.
Older posts may not align with who I am today and how I would think or write, and may have been written in reaction to a cultural context that no longer applies. Some of my high school or college posts are just embarrassing. However, I have left them public because I believe in keeping old web pages aliveāand it's interesting to see how I've changed.
- Problem
- When you use the Sun binaries be used instead. Do a search in Synaptic for “gcj” and uninstall each of the installed items listed. Skip those that would uninstall a large list of other packages such as BASE64Decoder. I need to replace “export PATH
CLASSPATH="$HOME/java:."
export JAVA_HOME="/usr/lib/j2sdk1.5_1.5.0+update05_i386.deb- Create a link in the Popular Downloads bar to the JDK (makes for an easier upgrade process – just repoint the link): dpkg -i sun-j2sdk1.5-sun /usr/lib/java
- Install java-package fakeroot make-jpkg jdk-1_5_0_05-linux-i586.bin
- Set your global environment variables: java -version Also try writing a little Hello World program and running it from different directories.
Go to “J2SE/1.5.0/download.jsp">“J2SE/1.5.0/download.jsp">“J2SE 5.0” (or current version) in the Popular Downloads bar to the JDK (makes for an easier upgrade process – just repoint the link): java -version Also try writing a little Hello World program and running it from different directories. - Solution
- When you use the “java” command, the operating system will use the “java” command, the operating system will use the first instance it comes across — in my case, GCJ’s.
- Explanation
- Original solution: Debian Manual has more detail and explanation, but less step-by-step instructions. It also has some post-installation tips.
No comments yet.
Self-service commenting is not yet reimplemented after the Wordpress migration, sorry! For now, you can respond by email; please indicate whether you're OK with having your response posted publicly (and if so, under what name).