1

I am using Windows 7 32-bit OS. I am using Eclipse 3.7 (Indigo) 32 bit. I have jdk1.7.0_07 32-bit installed. And sometimes when I go to run Eclipse as administrator, I get the following error message,

enter image description here

And when I tap "OK", I get the following error message,

enter image description here

And sometimes I get this error message. And at other times, Eclipse will launch, but fail when Gradle goes to initialize its VM when attempting to start its daemon process.

What's happening? I realize it's a memory issue, but why am I able to launch Eclipse once in a while and run everything just fine? And at other times, why I am able to launch Eclipse but not able to run anything, or unable to launch Eclipse at all?

As a developer, this behavior is a nuisance.

Community
  • 1
  • 1
user1329572
  • 6,176
  • 5
  • 29
  • 39
  • Did you modify your eclipse.ini file? Maybe it's just the version you are using, but I do not remember mine having all of those settings in it. I would check the error log for eclipse in your workspace\.metadata\ folder. It may have more information about what is happening when it does fail. – Logan Sep 21 '12 at 02:06
  • I did modify the eclipse.ini file to increase memory and point to the 1.7 JVM. I'll make sure to check the error log and report back, thanks! – user1329572 Sep 21 '12 at 12:22
  • what does your path look like? Have you got both 32 and 64 bit Java installed/ – RNJ Sep 24 '12 at 13:50
  • @RNJ, I only have 32bit Java installed. – user1329572 Sep 24 '12 at 14:32
  • Are you running Citrix or anything similar? I know that some of those DLL's get into windows memory space and chop it up preventing programs that need a large block (such as your 1GB) from running and you get this exact error. The only way around is to lower your mx number (unfortunately). – JoeG Sep 24 '12 at 14:33
  • @JoeG, Yeah...I lowered the mx to 512m, which seemed to do the trick. And I had to do a similar thing for the Gradle daemon. But I still get intermittent failures...this whole situation is very frustrating! >:| – user1329572 Sep 24 '12 at 15:02

4 Answers4

1

Try -Xmx900m. The problem might be with the eclipse.ini file.

  • 1
    Thanks for the suggestion, but currently mine is set to `Xmx1024m`. Why would decreasing the max. memory be helpful? I have 4GB of RAM, btw. – user1329572 Sep 21 '12 at 12:19
  • It looks as though lowering the `Xmx` from `1024m` seemed to enable Eclipse to consistently launch, although I'm still experiencing problems with the Gradle daemon, but I'll treat that as a separate question altogether. – user1329572 Sep 24 '12 at 15:31
  • I marked this as the answer since I needed to lower the max requested memory. I ended up lowering mine to `512m`, but this may vary system-to-system. – user1329572 Sep 25 '12 at 18:08
0

I've had this problem with JDK7. I've found that i do better with eclipse if it runs under Java 6, and then you add JDK7 as the runtime environment for your project.

Matt
  • 11,523
  • 2
  • 23
  • 33
  • You know, I did exactly that, but when I went to run my gradle build script, it complained about the source compatibility being wrong, since I have it set to `1.7`. – user1329572 Sep 21 '12 at 12:21
  • are you running your gradle script from within eclipse? If so, you may have to alter the plugin settings to repoint JAVA_HOME to your 1.7 jdk, or just select the right runtime in the gradle plugin settings (I don't use gradle at the moment, so i'm not sure what optiosn are available). – Matt Sep 21 '12 at 16:08
0

Make sure that your eclipse matches your jre/jdk bitwise. If you are using 32-bit eclipse, you must use 32-bit jdk.

Your -vm param is wrong. The arg must start on the next line like this:

-vm
c:\Program Files\java... etc

When the JVM (Sun's JVM) starts it allocates the heap as a single malloc, a single contiguous block of memory. If, for any reason, that much contiguous memory is not available then the JVM will not start. Without debugging your machine is hard to know what could be blocking a big malloc. Note that some viruses recently have been taking shelter inside the jvm.

Tyler Durden
  • 11,156
  • 9
  • 64
  • 126
  • 1
    `-vm` arg and value are on separator lines in the file...it is just displayed as one line in the error dialog. And yeah, I'm thinking about checking the integrity of my jvm...may have been compromised. – user1329572 Sep 24 '12 at 23:34
0

you said that your's is a 32 bit os is you your eclipse is 32 bit compatable or 64 bit if it is 64 bit remove the java related folder in your eclipse and replace it with 64 bith java sdk this will work i got this problem and i got it solved in this way.

Sivagopal Manpragada
  • 1,554
  • 13
  • 33