Last update on .

Sun does not allow redistribution of their JRE or SDK. The free VM’s for Java are behind by many versions. For that reason, some work has to be put in to get a usable Java development environment on Debian. I am using Debian Testing (Sarge).

There are two methods to get a Java environment set up: use the Blackdown Debian repository, and roll a .deb with Sun’s SDK.

Blackdown’s Debian repository is a hassle free way to install a Java SDK. The downside is that it lags behind Sun’s official SDK in fixes and features, and the repository is not always available or maintained. You can get information about the repository from Using the repository takes three steps:

  • Add deb sarge non-free to /etc/apt/sources.list
  • Run aptitude update
  • Run aptitude install j2sdk1.4 to get the SDK and aptitude install j2re1.4 to get the JRE

Using the latest official release from Sun takes a bit more work, but Debian has made some tools to stream line it a bit:

  • Make sure you have “unstable contrib” in /etc/apt/sources.list
  • Run aptitude install java-package
  • Download the J2SDK as a binary file from Sun’s web site. Be careful not to get the bin that unpacks into an RPM.
  • Run fakeroot make-jpkg <j2sdk package> to make a .deb package containing the SDK.
  • Run dpkg -i <SDK.deb> to install the package.
  • Run aptitude install sun-j2sdk1.4debian to get the Debian specific components.

That should give you a fully functional Java development environment. You might also want to install ant. I was impressed that Debian took care of installing the Java plugin for Mozilla for me.

Props go to Byron Clark for giving me these instructions.


Pingbacks are closed.


Comments are closed.