Friday 5 November 2010

Eclipse Installation Log

I've downloaded eclipse-jee-helios-SR1-linux-gtk-x86_64.tar.gz from the Eclipse website, that is Eclipse Helios last version up to date.
As I forgot to install the Java Devolopment Kit (JDK), I pointed to Sun's website (pardon me, Oracle's brand new machine) and got JDK 6 Update 22 (Java SE Development Kit 6u22), after chosing Linux 64 bits, which lead to jdk-6u22-linux-x64.bin.
I've moved the binary file to /usr/local/bin/, and eclipse's as well. I'm running Ubuntu 10.04 LTS on Virtual Box.
As sudo, I've run the Java script, that's ./jdk-6u22-linux-x64.bin at the prompt. It started to decompress and finally created everything in a folder called jdk1.60.22. Next step the always tricky part of setting the path to the Java home in the PATH. So sudo (whatever editor you use, I might Vim), that's sudo vim ~/.bashrc (bashrc is a hidden file in your home directory and configure the shell environment, you need to type ls -a in order to see it). At the end of the file, I've inserted:
export JAVA_HOME=/usr/local/bin/jdk1.6.0_22
export PATH=$JAVA_HOME/bin:$PATH

When I type at the prompt, echo $PATH the JAVA_HOME is appended. I took me a while.
Problem: Eclipse wouldn't launch, it was giving a error saying no Java virtual machine found. After some digging, (online digging?!) I've come up to this site http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/1409590#1409590 and this one at http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/3275659#3275659. Following instructions, I altered a file called Eclipse.ini in the Eclipse folder. I just added two lines:
-vm
/usr/local/bin/jdk1.6.0_22/bin/java
the whole file looks like this:
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1.R36x_v20100810
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
/usr/local/bin/jdk1.6.0_22/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx384m

Just added a launcher on my desktop and that it, it works. It sounds simple but almost got the whole afternoon. I'm actually suffering from time management problems, that means I STRESS!
Ok, next step, installing Android platform.

0 comments: