aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Since I want to use maven in my IDE should I dump eclipse for intellij Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Since I want to use maven in my IDE should I dump eclipse for intellij " Watch "Since I want to use maven in my IDE should I dump eclipse for intellij " New topic
Author

Since I want to use maven in my IDE should I dump eclipse for intellij

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
Eclipse has aproblem running with a maven plugin I think its well reported.

The Eclipse is running in a JRE, but a JDK is required , it reccomends putting the JDK path on the eclipse.ini, which i will ignore.

And if you put the vm -JDK path on your command line it will complain Could not create the Java Virtual Machine .

What I want to know is how easy is intelliJ o use wih maven, will I have similar config problems, which looking a past maven eclipse poss, is more a matter of luck if you get it up an running.

I want maven in my IDE so that I can run Junits from the IDE as well as commandline. And the maven plugin is needed so that my IDE can read my POM.

Cheers for any advice.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I have few problems with either, but I do most of my Maven work from the command line, regardless of which IDE I'm using. I still think IntelliJ is a better IDE, but Eclipse 3.5 brings them really close together, and Mylyn is a huge win for Eclipse until there's an IntelliJ version (and maybe there is now--I haven't been keeping track).
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16012
    
  19

If you get a "cannot create the java virtual machine" message when you put the JDK path on the command line, you're not giving the correct path. The JDK path isn't the path to the JRE inside the JDK, it's the root of the entire JDK. Java knows how to find the JRE when it needs it.

For the most part, you can ignore Eclipse Maven whining about the JDK/JRE issue. It's only absolutely required in certain cases. The bigger issue for me is that I've yet to figure out how it's bypassing my targeting of a JDK and going to a completely different JRE. Since it's only one of my secondary development machines, I've never taken the time to resolve it.


Customer surveys are for companies who didn't pay proper attention to begin with.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

What OS are you running? Is the OS 64-bit or 32-bit? I ask because if you don't get everything correct, the JVM will not load. For example, using a 64-bit Windows OS with a 64-bit JDK and a 32-bit Eclipse will not work. I have had to install an additional 32-bit JDK on my systems just to run Eclipse. Fortunately, the next version of Eclipse will have a 64-bit version for Windows.


JBoss In Action
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
I think the JVM is installed correctly

C:\eclipse>C:\JavaJDK\Java\jdk1.6.0_01\bin\java.exe -version
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode)

C:\eclipse>


I can javac build everything else. All that is not working is trying to run eclipse with the JDK pah
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
I am running 32Kbit. Eclipse starts fine, if I just start eclipse. That is not the problem.

The problem is running maven an eclipse together. If I dont start eclipse with the -vm JDK pah.

Eclipse wont work properly as in the class loader can find classes on the class path.
I only have this problem with the eclipse version with the maven plug in.

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

I place the -vm entry in my eclipse.ini file, just before the -vmargs entry. Here is an excerpt:



Note that the -vm and the path must be on two different lines. The path can be either to the jvm.dll, like I have it, or to java.exe or javaw.exe.
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
Thanks Peter Johnson that solved the problem.

Here is my eclipse.ini file in full for others who may have this problem.

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
C:\JavaJDK\Java\jdk1.6.0_01\jre\bin\client\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Since I want to use maven in my IDE should I dump eclipse for intellij