2012-08-24 44 views
0

我正在嘗試編寫build.xml GWTP + MGWT項目移動,桌面&平板電腦。GWTP + MGWT - jar中的錯誤:file:mgwt-1.1.1.jar!/com/googlecode/mgwt/ui/client/theme/MGWTThemeBaseThemeStandardImpl.java'

<javac srcdir="${apt_generated}" destdir="${out.classes.folder}" includeantruntime="true" source="1.6" target="1.6" nowarn="false" debug="true" debuglevel="lines,vars,source" > 
     <classpath refid="project.class.path" /> 
     <compilerarg value="-Xlint"/> 
    </javac> 
    <javac srcdir="${in.src.folder}" fork="true" memoryinitialsize="512m" memorymaximumsize="1024m" includes="**" encoding="utf-8" destdir="${out.classes.folder}" source="1.6" target="1.6" nowarn="false" debug="true" debuglevel="lines,vars,source" includeantruntime="true"> 
     <classpath refid="project.class.path" /> 
     <compilerarg value="-Xlint"/> 
    </javac>  
    <copy todir="${out.classes.folder}"> 
     <fileset dir="${in.src.folder}" includes="**/*.class" /> 
    </copy> 
    <delete dir="${in.src.folder}" includes="**/*.class" failonerror="false" /> 

應用程序運行在開發模式很好,但我看到下面的錯誤,當我做 「蟻族gwtc」 -

 
gwtc: 
    [java] Compiling module com.company.proj.fe.TestApp 
    [java] Validating newly compiled units 
    [java]  Ignored 1 unit with compilation errors in first pass. 
    [java] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. 

    [java] [ERROR] Errors in 'jar:file:/workspace/testapp/war/WEB-INF/lib/ 
mgwt-1.1.1.jar!/com/googlecode/mgwt/ui/client/theme/ 
MGWTThemeBaseThemeStandardImpl.java' 
    [java]  [ERROR] Internal compiler error 
    [java] java.lang.OutOfMemoryError: Java heap space 
    [java]  at java.lang.String.toCharArray(String.java:2725) 
    [java]  at com.google.gwt.dev.jdt.AbstractCompiler$CompilationUnitAdapter.getContents(AbstractCompiler.java:105) 
    [java]  at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9485) 
    [java]  at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9457) 
    [java]  at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8102) 
    [java]  at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:322) 
    [java]  at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:131) 
    [java]  at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:1090) 
    [java]  at com.google.gwt.dev.javac.JdtCompiler.resolveType(JdtCompiler.java:438) 
    [java]  at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.resolvePossiblyNestedType(AbstractCompiler.java:292) 
    [java]  at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$500(AbstractCompiler.java:139) 
    [java]  at com.google.gwt.dev.jdt.AbstractCompiler.resolvePossiblyNestedType(AbstractCompiler.java:625) 
    [java]  at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.checkRebindResultInstantiable(WebModeCompilerFrontEnd.java:130) 
    [java]  at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:118) 
    [java]  at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254) 
    [java]  at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444) 
    [java]  at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:173) 
    [java]  at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288) 
    [java]  at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:139) 
    [java]  at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:588) 
    [java]  at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:97) 
    [java]  at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:52) 
    [java]  at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:569) 
    [java]  at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33) 
    [java]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:284) 
    [java]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:233) 
    [java]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:145) 
    [java]  at com.google.gwt.dev.Compiler.run(Compiler.java:232) 
    [java]  at com.google.gwt.dev.Compiler.run(Compiler.java:198) 
    [java]  at com.google.gwt.dev.Compiler$1.run(Compiler.java:170) 
    [java]  at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88) 
    [java]  at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82) 

我加了fork =「true」memoryinitialsize =「512m」memorymaximumsize =「1024m」。但這些似乎並不奏效。

回答

0

我在編譯GWT應用程序時遇到了一些問題,如果JRE的內存很少的話。

嘗試增加你的螞蟻進程的內存。

我的一個GWT應用程序只能在64位JVM中編譯。

我用4g RAM和64位JVM編譯我的應用程序。