Jake, I got around this problem while attempting to compile with JDK
1.3.  What I did was modify the Plexus JavaCompiler to use a file list
instead of the command line.  The challenge is creating a mojo
component.  Here's the code in case you want to do the same:  

File fileList = new File(config.getWorkingDirectory(), "sourceFiles");
        try {
            FileWriter fwriter = new FileWriter(fileList);
            for ( int i = 0; i < sourceFiles.length; i++ )
            {
                fwriter.write(sourceFiles[i] + "\n");
            }
            fwriter.flush();
            args.add("@" + fileList.getName());
        } catch (IOException e) {
            e.printStackTrace();
        }

Contact me directly if you need help doing this.  HTH. 

Marc Dugger
[EMAIL PROTECTED]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6% real estate sales commission? Not likely.
Learn why at http://tinyurl.com/dvkbu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Quoting Jake Pezaro <[EMAIL PROTECTED]>:

> i need to do some memory-intensive java compilation (918 files, 678
> in
> one directory alone, largest .java file is around 500K).  setting
> the
> -J-Xmx argument should fix it.  the problems i encountered are:
> 
> - i must fork the process in order to do it as the maven compiler
> will
> not accept this option
> - forking the process fails with the following error (possibly due
> to
> the command line options being 82789 characters long):
> 
> Caused by: java.io.IOException: CreateProcess: CMD.EXE /X /C javac
> -d
> c:\dev\workspace\CheltenhamWeb-2-2-1\target\classes -classpath
> c:\dev\...<very long command
> line>\axis-saaj-1.3.jar;C:\DOCUME~1\user\.m2\repository\axi?
>         at java.lang.Win32Process.create(Native Method)
>         at java.lang.Win32Process.<init>(Win32Process.java:66)
>         at java.lang.Runtime.execInternal(Native Method)
>         at java.lang.Runtime.exec(Runtime.java:566)
>         at
> org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:692)
>         ... 24 more
> 
> i am not sure how to solve this.  is there a way to increase the
> compiler memory without forking the process?  is there a way to fix
> the
> problem i am having forking the javac process?  any suggestions
> welcome.
> 
> thanks
> 
> jake
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security
> System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to