Java Development on Ubuntu - Part 1 - Installing Java
发表于 : 2005-10-23 2:15
Since the beta of NetBeans 5.0 has been launched, and "Early Availability" versions of Java Studio Creator 2 and Java Studio Enterprise 8 are available, and the next release of Ubuntu is just about out the door, I thought it was time to update my previous post on doing Java development on Ubuntu.
First, I guess some folks might say "Ubuntu? Don't you work for Sun? Why not Solaris X86?". Too easy, I reckon: that's a supported platform, and you should have no problem getting Java and the tools we'll be talking about up and running together on Solaris. For those of you who - like me - are interested in the progress of Linux on the desktop, and would like to have our development tools available in that environment, this is for you. And besides, the new release of Ubuntu is a wonderful desktop on my new Inspiron 9300.
OK, excuses over, let's get to it. Our first step is an easy one, and basically the same as described before. First download the most recent jdk: at the time of writing, this is jdk-1_5_0_05-linux-i586.bin. Be sure to get the .bin, not the .rpm.
Next install - either with synaptics or apt-get or wajig, whatever your preference, the package "java-package": for example, sudo apt-get install java-package. Note that this will also install the package "fakeroot", if you don't already have it installed. Note also that java-package is in "multiverse", so your repository list /etc/ept/sources.list needs to contain, for example:
deb http://au.archive.ubuntu.com/ubuntu breezy multiverse
deb-src http://au.archive.ubuntu.com/ubuntu breezy multiverse
Create a Debian java package with fakeroot make-jpkg, for example
fakeroot make-jpkg jdk-1_5_0_05-linux-i586.bin
Important: don't use sudo to do this, and expect to get some warning/ error "permission denied" messages. This should create a debian package - sun-j2sdk1.5_1.5.0+update05_i386.deb - ready to install with dpkg or wajig. For example,
sudo dpkg -i sun-j2sdk1.5_1.5.0+update05_i386.deb
Once you've installed it, you'll be up and running with the latest jdk: your JAVA_HOME is now, for example, /usr/lib/j2sdk1.5-sun. Get a command line, and enter java -version: you should see something like:
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
Next installment, NetBeans!
http://blogs.sun.com/roller/page/coldri ... buntu_part
First, I guess some folks might say "Ubuntu? Don't you work for Sun? Why not Solaris X86?". Too easy, I reckon: that's a supported platform, and you should have no problem getting Java and the tools we'll be talking about up and running together on Solaris. For those of you who - like me - are interested in the progress of Linux on the desktop, and would like to have our development tools available in that environment, this is for you. And besides, the new release of Ubuntu is a wonderful desktop on my new Inspiron 9300.
OK, excuses over, let's get to it. Our first step is an easy one, and basically the same as described before. First download the most recent jdk: at the time of writing, this is jdk-1_5_0_05-linux-i586.bin. Be sure to get the .bin, not the .rpm.
Next install - either with synaptics or apt-get or wajig, whatever your preference, the package "java-package": for example, sudo apt-get install java-package. Note that this will also install the package "fakeroot", if you don't already have it installed. Note also that java-package is in "multiverse", so your repository list /etc/ept/sources.list needs to contain, for example:
deb http://au.archive.ubuntu.com/ubuntu breezy multiverse
deb-src http://au.archive.ubuntu.com/ubuntu breezy multiverse
Create a Debian java package with fakeroot make-jpkg, for example
fakeroot make-jpkg jdk-1_5_0_05-linux-i586.bin
Important: don't use sudo to do this, and expect to get some warning/ error "permission denied" messages. This should create a debian package - sun-j2sdk1.5_1.5.0+update05_i386.deb - ready to install with dpkg or wajig. For example,
sudo dpkg -i sun-j2sdk1.5_1.5.0+update05_i386.deb
Once you've installed it, you'll be up and running with the latest jdk: your JAVA_HOME is now, for example, /usr/lib/j2sdk1.5-sun. Get a command line, and enter java -version: you should see something like:
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
Next installment, NetBeans!
http://blogs.sun.com/roller/page/coldri ... buntu_part