Thursday, February 19, 2009

The installation of Eclipse and M2Eclipse

Before Eclipse, I've tried JBuilder, Together and MyEclipse. All these are the bundle of Java tools, whose core is Eclipse. They are cracked warez. So when I try to install M2Eclipse, the Maven add-on, various problem occurred. Finally I make up my mind to uninstall them all and turn to the simple Eclipse.

As an open source software, Eclipse is no need to be installed. The version I use now is eclipse-java-ganymede-SR1-win32, the economical version. I copy the unzip folder to C:\. So the installation path is C:\Eclipse.

Step 1. Modify Eclipse.ini and change the target of quick link for eclipse.exe.
I don't know why this file have to be modified. But if not, you will get error report when you run Eclipse with Maven together.
Add the following line in front of -vmargs.
"-vm
C:\Java\jdk1.6.0_10\bin\javaw.exe"
Meanwhile, change the properties of the quick link for Eclipse. The new Target should be "C:\Eclipse\eclipse.exe -vm C:\java\jdk1.6.0_10\bin\javaw.exe".

Note: Here is a bug for JVM. If you add "-vm C:\Java\jdk1.6.0_10\bin\javaw" instead of "-vm C:\Java\jdk1.6.0_10\bin\javaw.exe". It will show a "FATAL ERROR" message after the "BUILD SUCCESSFUL" of Maven information when debugging.

Step 2. Install M2Eclipse for Eclipse. (Note: M2Eclipse means "maven version 2 for eclipse")
In Eclipse, click "Help", then "Software Update", then "Avaliable Software",then "Add site". In the blank for "Location", fill in "http://m2eclipse.sonatype.org/update/ ". After that, the List of avialbe software will include "Maven Integaration for Eclipse Update Site". Make sure it's selected, then click "Install" on the right side. When the installation is finished, then this add-on is installed successfully.

2 comments:

Eugene Kuleshov said...

Here is why.

Tingting said...

" ... because those actions runs in the same JVM where Eclipse is running. If that JVM comes from JRE that isn't part of JDK, there is no Java compiler (the tools.jar) around ... "
Get it. Thanks!