用Ant编译项目代码报异常
[javac] java.nio.BufferOverflowException
[javac] at java.nio.Buffer.nextPutIndex(Buffer.java:419)
[javac] at java.nio.HeapCharBuffer.put(HeapCharBuffer.java:145)
[javac] at com.sun.tools.javac.parser.Scanner.decode(Scanner.java:405)
[javac] at com.sun.tools.javac.parser.Scanner.<init>(Scanner.java:304)
[javac] at com.sun.tools.javac.parser.Scanner.<init>(Scanner.java:238)
[javac] at com.sun.tools.javac.parser.Scanner$Factory.newScanner(Scanner.java:72)
[javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:254)
[javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:281)
[javac] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:399)
[javac] at com.sun.tools.javac.main.Main.compile(Main.java:592)
[javac] at com.sun.tools.javac.main.Main.compile(Main.java:544)
[javac] at com.sun.tools.javac.Main.compile(Main.java:74)
[javac] at com.sun.tools.javac.Main$1.run(Main.java:57)
搜了下网上的案例没有说太清楚,字面直观就是缓冲区溢出了,
经过对升级代码的查看,发现编译不过的代码在编译环境中显示是乱码,
重新保存生成中文字体后,再编译,异常没有了
[javac] java.nio.BufferOverflowException
[javac] at java.nio.Buffer.nextPutIndex(Buffer.java:419)
[javac] at java.nio.HeapCharBuffer.put(HeapCharBuffer.java:145)
[javac] at com.sun.tools.javac.parser.Scanner.decode(Scanner.java:405)
[javac] at com.sun.tools.javac.parser.Scanner.<init>(Scanner.java:304)
[javac] at com.sun.tools.javac.parser.Scanner.<init>(Scanner.java:238)
[javac] at com.sun.tools.javac.parser.Scanner$Factory.newScanner(Scanner.java:72)
[javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:254)
[javac] at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:281)
[javac] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:399)
[javac] at com.sun.tools.javac.main.Main.compile(Main.java:592)
[javac] at com.sun.tools.javac.main.Main.compile(Main.java:544)
[javac] at com.sun.tools.javac.Main.compile(Main.java:74)
[javac] at com.sun.tools.javac.Main$1.run(Main.java:57)
搜了下网上的案例没有说太清楚,字面直观就是缓冲区溢出了,
经过对升级代码的查看,发现编译不过的代码在编译环境中显示是乱码,
重新保存生成中文字体后,再编译,异常没有了