Part Two – installing the Java SDK
updated February 8th 2012
Let just get right into it! open up your terminal session and lets continue!
- mkdir -p ~/android/environment/system – this will make both the environment and system folders with one command (I love -p!)
- sudo mount -a && cd ~/Downloads && ls – make sure everything that should be there is actually there
- wget http://download.oracle.com/otn-pub/java/jdk/7u2-b13/jdk-7u2-linux-i586.tar.gz – 32-bit Linux java SDK (includes the SE/JRE version and bypasses clicking the I agree button to their terms…)
- sudo mkdir /opt/java && sudo tar xvfz jdk-7u2-linux-x64.tar.gz -C /opt/java/
– remember to use [tab] after typing jdk so you can use this even if the version gets updated
- sudo apt-get install galternatives
- sudo rm /opt/java/*.bin – this will remove almost 200MB from your VM HDD
- and restart the VM again
- after the VM comes back up mount your shares again and take a second snapshot, we’ll name this one Java jre & jdk installed, in the comments note that you have also added galternatives
We will finish up part two here, the next section is where a little mistake will have you reverting to this last snapshot, so you will be happy we made it (I did not make the second snapshot the first time through and while all the way at the end of part three I had to revert back to the end of part one and redo this section again).