JDK For Ubuntu

Using Linux is a bit like driving a car with stick-shift. I think you can learn a lot by playing with operating systems that you are not familiar with. If you only know one operating system, and only one IDE, and only one Computer language, your ideas about how hardware and software work might be befuddled. As the saying goes, a fish doesn't know what water is until you remove it from the water! Ubuntu is a good start into this world, and it is free! You can install it on an old computer, or even a virtual computer. If you have enough hard drive space, you can use the free VirtualBox to make a virtual machine to install Ubuntu. After installing Ubuntu you will want to run the 'Update Manager and and update everything, and restart.

Since Oracle owns the Sun Java JDK, and has retired the OS Distributor License, you can either switch to OpenJava, or install Oracle's yourself. OpenJava may not be a bad idea since it will become the official implementation, but security risks abound with something as powerful as the JavaVM, so be sure to update frequently, whichever you install!

OpenJDK Development

Open the Ubuntu Software Center and search for "jdk" and choose the latest OpneJDK Development Kit (currently openjdk-7-jdk). This choice is easy to keep current with the Update Manager, but may not update as frequently. At the time that I am writing this OpenJDK is at 1.7.0 update 3, whist the Oracle site has update 5. It is easier to get working, though, so this is the way to go if you just want to start writing Java.

Oracle's Sun Java JDK

This is definitely "driving with a standard transmission" but you will learn lots getting this to work. I found a video and a tutorial. To copy and paste in Linux, use Control-Shift-C and Control-Shift-V. A quick way to launch the terminal is Control-Alt-T (or Control-Option-T on a Apple keyboard). The tutorial has an older link to oracle, so use this link then click Java SE JDK to get to the page with the latest release. Choose the tar.gz version for you. If you have a 32 bit Ubuntu use the the i586, and if you have the 64 bit version of ubuntu choose x64. If you are not sure, open a terminal and type uname -a and the out put will mention i686 stuff for 32 bit or else something ending in 64.

I love Ubuntu 12.04, but prefer Oracle's Java sdk. I have a Simple Way to Install Oracle's Java on Ubuntu, and will be making a video shortly.

Installing Blue-J

I downloaded the .deb file from blueJ, and double-clicked it to install. Since this Debian installation file is expecting version 6, we need to tweak a bit after the installation so it can launch nicely from the DashHome. To do so we need to install Main Menu with the Ubuntu Software Center Launch Main Menu and select Applications->Programming->BlueJ and click the Properties button. In the Command: box type:

java -jar /usr/share/bluej/bluej.jar

You should now be able to launch BlueJ from DashHome

Installing Eclipse

If you've downloaded the eclipse from their official website follow the following steps for the installation

Extract the eclipse.XX.YY.tar.gz using

$ tar -zxvf eclipse.XX.YY.tar.gz

Become root

$ sudo su

Copy the extracted folder to /opt

  1. cp eclipse.XX.YY /opt

Create a desktop file and place it into /usr/share/applications

  1. gedit /usr/share/applications/eclipse.desktop and copy the following
[Desktop Entry]
Name=Eclipse 
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=eclipse.desktop

Create a symlink in /usr/local/bin using

  1. cd /usr/local/bin
  2. ln -s /opt/eclipse/eclipse

Thats it.