Issue with Java and running a build

Hi there,

I have Java JDK 1.6.0.23 installed, along with IntelliJ Idea 10.0, when creating a new project and trying to run it, the build always fails with the following Error message "Error: Could not create the Java virtual machine.". I am running Windows 7 64 bit, my Java is 32bit, it wouldnt recognize 64bit Java so I uninstalled it and get the 32bit. Which works fine as far as I can tell, as I am able to run Android emulators, etc...
Has anyone else run into this issue?

Thanks,

4 comments
Comment actions Permalink

What exactly is failing? Compilation or starting of the application? Check the list of VM options you are using, maybe there is some option which breaks VM startup, like too low or loo high heap size, or maybe 32-bit VM specific option.

0
Comment actions Permalink

hey, its the compilation thats failing, when I am trying to compile the project I get the following messages:

Error occured during initialization of VM
Could not reserve enough space for object heap
Compilation completed with 1 error and 0 warnings
Error: Could not create the Java virtual machine

what options should I set for VM to avoid this?

btw, this is an android platform project that I am trying to compile.

0
Comment actions Permalink

actually, just messed around with the VM options, setting it to 512mb did the trick! :)

0
Comment actions Permalink

I'm running IntelliJ 10 (IU 102-216), JDK 1.6.0_21 from Sun/Oracle, and Windows XP SP3.


I'm having this issue all of a sudden as well, in two different contexts.


The first one is a Spring 3 project that uses Maven.  I can run Maven and download all the dependencies, but when I try to execute a Maven task like compile or package I'm told "Could not create the Java virtual machine".  I can see "-Xmx1042m" in the command that starts Maven, but I can't see where to reset it.

The second one is my first Android project.  I downloaded and installed the Android SDK, but when I try to run the project here is the complete message:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Compilation completed with 1 error and 0 warnings
1 error
0 warnings
Could not create the Java virtual machine.

Here are the contents of my idea.exe.vmoptions:


-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-ea
-agentlib:yjpagent=disablej2ee,disablecounts,disablealloc,sessionname=IntelliJIdea10


As you can see, my max heap size is 512 MB.

I thought I was losing my mind, so I re-opened a vanilla Java project and tried to run it - all was well.

What's going on?  What am I doing wrong?   This started happened after I purchased and installed IntelliJ version 10.  Please advise.

Sorry, I should ask a new questions since this one is marked as "answered".  My mistake.

Question answered: Please see http://devnet.jetbrains.net/message/5284961#5284961

0

Please sign in to leave a comment.