Bug 169314 - ECJ -J option should be implemented
Summary: ECJ -J option should be implemented
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 3.3 RC4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL: http://gcc.gnu.org/bugzilla/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-01 15:02 EST by Audrius Meskauskas CLA
Modified: 2007-06-22 12:51 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Audrius Meskauskas CLA 2007-01-01 15:02:58 EST
The -J option of the eclipse java compiler is currently reported as being ignored, and likely is. Because of this, ecj may fail with the large projects like GNU Classpath when the compiler runs out of the allowed memory. With the recent GNU Classpath CVS head, the following message was observed:

/usr/bin/ecj -1.5 -J-Xmx400m -warn:-deprecation,serial,typeHiding,unchecked,unused,varargsCast -proceedOnError -bootclasspath '' -classpath ../vm/reference:..:../external/w3c_dom:../external/sax:../external/relaxngDatatype:../external/jsr166:.:: -d . @classes
incorrect classpath:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

When using Sun's javac, the -J-Xmx400m options helps to pass this place of compilation, asking to give more memory. Without this option, javac fails exactly with the same out of memory error and on the same build line as well.

Reported against Eclipse Java Compiler v_585_R31x, 3.1.2 release under Fedora Linux (i686 architecture)
Comment 1 Philipe Mulet CLA 2007-01-08 06:20:56 EST
Can we do something here, since we are not building the executable ourselves.
Comment 2 Audrius Meskauskas CLA 2007-01-08 06:37:41 EST
The trivial workaround is to find the ecj startup scrip (this may be the /bin/ecj or something like that) and manually edit it how needed (the script contains the commands to launch the eclipse with the default java virtual machine).

The real solution would be to provide a startup loader that would check the options, needed to pass to the virtual machine, and would pass them. This likely should be written in C.
Comment 3 Olivier Thomann CLA 2007-06-21 14:15:09 EDT
Closing as INVALID.
We don't build the executable or provide the script.
This should be done when building the executable or inside the script.