When I first got my slice, I had it setup with java and tomcat. Apparently, I updated or rebuilt my slice and forgot to install those two again. Too bad I didn’t take good notes because I totally forgot how to do it.
So this time, I’m going to document it via this post.
I am currently running Ubuntu Feisty (v. 7.04). You can find out what version you’re running by running the following command:
cat /etc/issue
The usual apt-get
command allows me to install sun-j2re1.4. That’s not very helpful if I want to compile java code off of my slice or set it up to be a continuous build server. I remember that I had to add a specific repository in order to be able to install the Java SDK via apt-get. After some digging around, I came up with the following:
sudo vi /etc/apt/sources.list
Paste the following into the file:
deb http://archive.ubuntu.com/ubuntu feisty universe multiverse deb-src http://archive.ubuntu.com/ubuntu feisty universe multiverse
The Ubuntu docs recommend enabling the universe/multiverse security/updates repositories to prevent version mismatches during installs or upgrades but I didn’t run into any issues proceding without them.
Save and exit out of vi.
Next, run
sudo apt-get update
apt-get should be pulling down an updated list of installable packages. So if you type
sudo apt-get install sun-j
and then hit TAB, you should get a list of installable sun packages.
I decided to install Java 6.0 SDK.
sudo apt-get install sun-java6-sdk
It will begin to download and install the SDK. You will have to accept a license. Just hit TAB to get select “OK” and hit enter.
Once it completes, you should be able to confirm the JDK was installed successfully.
>> javac -version javac 1.6.0
The next post will lay out steps to install Apache Tomcat.
[…] the previous post, I described how to get your Java SDK installed on your machine. In this piece, I’ll lay out […]
[…] it to demo a business intelligence application, and boy oh boy was it a pain. There is a lot of talk out there about this particular install but nothing specifically for Ubuntu 8.04 […]
Good instruction set. Using your post I’ve successfully installed a JDK 6 on Ubuntu 8.10 Intrepid at Slicehost.com. Thanks.
This is great. Adding it to the slicehost wiki pages or tutorials would be a good idea.