buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mat Schaffer <>
Subject Re: What would be the best way of allocating more memory to the compiler ?
Date Mon, 14 Sep 2009 14:56:03 GMT
Huh, I stand corrected.  Apparently the -J is a convention for passing  
options to the underlying VM in more than just jruby. Learn something  
new every day.

Have to tried assembling a javac command yourself and running it? I  
wonder if buildr might be putting that option on the end or some place  
where javac isn't happy with it.


On Sep 14, 2009, at 10:10 AM, Antoine Toulme wrote:

> I get this:javac: invalid flag: -J-Xmx512m
> Following your indication, I get:
> javac: invalid flag: -Xmx512m
> I believe it might have to do with the order of the parameters.
> I don't think the -J is a jruby thing, from the output of javac and
> various google searches, I found it is used for javac:
> javac --help
> javac: invalid flag: --help
> Usage: javac <options> <source files>
> where possible options include:
>  -g                         Generate all debugging info
>  -g:none                    Generate no debugging info
>  -g:{lines,vars,source}     Generate only some debugging info
>  -nowarn                    Generate no warnings
>  -verbose                   Output messages about what the compiler is
> doing
>  -deprecation               Output source locations where deprecated  
> APIs
> are used
>  -classpath <path>          Specify where to find user class files
>  -cp <path>                 Specify where to find user class files
>  -sourcepath <path>         Specify where to find input source files
>  -bootclasspath <path>      Override location of bootstrap class files
>  -extdirs <dirs>            Override location of installed extensions
>  -endorseddirs <dirs>       Override location of endorsed standards  
> path
>  -d <directory>             Specify where to place generated class  
> files
>  -encoding <encoding>       Specify character encoding used by  
> source files
>  -source <release>          Provide source compatibility with  
> specified
> release
>  -target <release>          Generate class files for specific VM  
> version
>  -version                   Version information
>  -help                      Print a synopsis of standard options
>  -X                         Print a synopsis of nonstandard options
>  -J<flag>                   Pass <flag> directly to the runtime system
> The javac man page also has a good paragraph about it.
> Yes, it's a first for me as well to see the compiler run out of  
> memory.
> Let's just say the classpath englobes half the Apache maven repo...  
> (and no,
> I can't do much about that.)
> Thanks,
> Antoine
> On Mon, Sep 14, 2009 at 16:02, Mat Schaffer <> wrote:
>> What's the error you're getting? I find it a little surprising that
>> compilation is running out of memory just cause I've never seen  
>> that before.
>> As an aside the "-J" is a jruby thing so you might be able to take  
>> that off
>> and just use "-X" and that might work.
>> -Mat
>> On Sep 14, 2009, at 9:37 AM, Antoine Toulme <>
>> wrote:
>> I tried:compile.options.other = ["-J-Xmx512m"]
>>> but for some reason it is not accepted by the compiler.
>>> Am I missing something obvious here ?
>>> Thanks,
>>> Antoine

View raw message