Internal compiler error (JVM heap-space related)

1
I imported an extremely large Java source-file (~.java 350kB / ~.class175kB) into Eclipse and made small modifications to it. After saving and deploying the Mendix-project (mendix and Eclipse share java-source project folder) no errors were reported in Mendix console. Upon reopening the file in Eclipse got "internal compiler error- OutOfMemoryError: Java Heap space" (line 0). Heap-space in project settings were already customized to 1024MB beforehand, which turns out to be the maximum that the JVM can handle. Unable to change the eclipse.ini-settings from the cmd.exe command line, so manualy manipulated the ini-parameters (originally .XXMaxPermSize256M, -Xms256M and -Xmx1024M). Tried several combinations with no effect. What should I do?
asked
3 answers
4

1024k is less than a 1.44MB floppy disk. You probably want to specify java heap size in megabytes instead of kilobytes, e.g. -Xmx128M -Xms128M

answered
2

You really should not need a 1GB heap to compile a 350kB java file. Can you easily reproduce this error, and do you have more copy/paste error messages, including stacktraces and things? I don't know how mixing a project in eclipse and the modeler works, who's gonna (re-)compile stuff when starting, but probably someone else can comment on this from experience.

.XXMaxPermSize256M will be ignored by the JVM because it's syntactically incorrect. -XX:MaxPermSize=256M would work, but MaxPermSize isn't really the problem here.

answered
1

What finally seemed to help was option 'close unrelated projects' (right mouse click on upper project folder in eclipse project explorer). Not saying that this is the ultimate solution but leading to a 'workable situation'.

answered