Install Maven in Eclipse: the eclipse.ini -vm option

maven-logo-2.gif

While setting up the Maven for Eclipse, if you use a Java JRE instead of JDK you’ll be prompted like this:

 

The warning received after I installed Maven on Eclipse because I was using JAVA JRE instead of JDK

Clicking on the first active text takes you to their Help website – Running Eclipse section where you’ll find a plethora of attributes to set in order to customize your IDE.

You have to go and edit into eclipse.ini, which situated in your Eclipse directory. Being a text file, edit it with your preferred editor. I use very much a free product made by a community of enthusiastic people called Notepad++.

The trickiest part when configuring the “-vm” option in eclipse.ini is that you have to place the path to your jdk on a new line:


-vm
C:\Program Files\Java\jdk1.5.0_18\

and not:


-vm C:\Program Files\Java\jdk1.5.0_18\

You can check it visually, by going into configuration options: Help -> About Eclipse Platform, then click Configuration Details button.