JavaFX 8 ant 构建错误代码太大
JavaFX 8 ant build error code too large
我在eclipse上开发;我的代码目前编译并直接从 eclipse 中运行查找(通过执行 运行 作为 Java 应用程序)——我在此过程中没有遇到任何错误。
然后我尝试生成 Ant build.xml 并尝试编译它,这以 BUILD FAILED
结束;下面是构建的输出:
Buildfile: C:\App-Path\build\build.xml
setup-staging-area:
[delete] Deleting directory C:\App-Path\build\externalLibs
[delete] Deleting directory C:\App-Path\build\project
[delete] Deleting directory C:\App-Path\build\projectRefs
[mkdir] Created dir: C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[mkdir] Created dir: C:\App-Path\build\project
[copy] Copying 59 files to C:\App-Path\build\project
[copy] Copied 22 empty directories to 2 empty directories under C:\App-Path\build\project
[mkdir] Created dir: C:\App-Path\build\projectRefs
do-compile:
[delete] Deleting directory C:\App-Path\build\build
[mkdir] Created dir: C:\App-Path\build\build\src
[mkdir] Created dir: C:\App-Path\build\build\libs
[mkdir] Created dir: C:\App-Path\build\build\classes
[copy] Copying 9 files to C:\App-Path\build\build\libs
[copy] Copying 59 files to C:\App-Path\build\build\src
[copy] Copied 21 empty directories to 2 empty directories under C:\App-Path\build\build\src
[javac] Compiling 29 source files to C:\App-Path\build\build\classes
[javac] C:\App-Path\build\build\src\com\stt3\types\IcomoonUltimatePack.java:60: error: code too large
[javac] HOME('\ue900'),
[javac] ^
[javac] Note: C:\App-Path\build\build\src\com\stt3\test\YQLParser.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
BUILD FAILED
C:\App-Path\build\build.xml:107: Compile failed; see the compiler error output for details.
Total time: 3 seconds
似乎产生错误的 Class 只是对 JavaFX FontAwesome Glyph class(定义 here)现有代码的改编IcoMoon 字形集(大约 2000 glyphs/character 个关联)。
这是违规 class 代码的 link:https://gist.github.com/autronix/51322d3c24f21e6755a5
由于代码正在编译并且 运行 直接在 eclipse 中很好,我想知道我是否遗漏了 ant 编译器中的任何参数。我还没弄清楚如何解决这个问题。
如有任何帮助,我们将不胜感激。
谢谢
Java中的方法仅限于64k字节码。一旦超过限制,java 编译器将抛出错误
error: code too large
所有静态初始化都是在一个方法中完成的,因此有可能因此而发生。
在eclipse中运行良好,因为eclipse有自己的编译器。
如果您想阅读更多相关信息,this 是一个不错的话题。
我在eclipse上开发;我的代码目前编译并直接从 eclipse 中运行查找(通过执行 运行 作为 Java 应用程序)——我在此过程中没有遇到任何错误。
然后我尝试生成 Ant build.xml 并尝试编译它,这以 BUILD FAILED
结束;下面是构建的输出:
Buildfile: C:\App-Path\build\build.xml
setup-staging-area:
[delete] Deleting directory C:\App-Path\build\externalLibs
[delete] Deleting directory C:\App-Path\build\project
[delete] Deleting directory C:\App-Path\build\projectRefs
[mkdir] Created dir: C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[copy] Copying 1 file to C:\App-Path\build\externalLibs
[mkdir] Created dir: C:\App-Path\build\project
[copy] Copying 59 files to C:\App-Path\build\project
[copy] Copied 22 empty directories to 2 empty directories under C:\App-Path\build\project
[mkdir] Created dir: C:\App-Path\build\projectRefs
do-compile:
[delete] Deleting directory C:\App-Path\build\build
[mkdir] Created dir: C:\App-Path\build\build\src
[mkdir] Created dir: C:\App-Path\build\build\libs
[mkdir] Created dir: C:\App-Path\build\build\classes
[copy] Copying 9 files to C:\App-Path\build\build\libs
[copy] Copying 59 files to C:\App-Path\build\build\src
[copy] Copied 21 empty directories to 2 empty directories under C:\App-Path\build\build\src
[javac] Compiling 29 source files to C:\App-Path\build\build\classes
[javac] C:\App-Path\build\build\src\com\stt3\types\IcomoonUltimatePack.java:60: error: code too large
[javac] HOME('\ue900'),
[javac] ^
[javac] Note: C:\App-Path\build\build\src\com\stt3\test\YQLParser.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
BUILD FAILED
C:\App-Path\build\build.xml:107: Compile failed; see the compiler error output for details.
Total time: 3 seconds
似乎产生错误的 Class 只是对 JavaFX FontAwesome Glyph class(定义 here)现有代码的改编IcoMoon 字形集(大约 2000 glyphs/character 个关联)。
这是违规 class 代码的 link:https://gist.github.com/autronix/51322d3c24f21e6755a5
由于代码正在编译并且 运行 直接在 eclipse 中很好,我想知道我是否遗漏了 ant 编译器中的任何参数。我还没弄清楚如何解决这个问题。
如有任何帮助,我们将不胜感激。
谢谢
Java中的方法仅限于64k字节码。一旦超过限制,java 编译器将抛出错误
error: code too large
所有静态初始化都是在一个方法中完成的,因此有可能因此而发生。
在eclipse中运行良好,因为eclipse有自己的编译器。
如果您想阅读更多相关信息,this 是一个不错的话题。