生成Javadoc时出现BufferOverflowException?
有人曾经遇到过 javadoc 工具导致 java.nio.BufferOverflowException 的问题吗?
我正在尝试为带有日语注释(字符集 MS932)的代码生成 Javadoc。 我认为这可能是相关的。 有人知道这个问题的解决方法吗?
这是堆栈跟踪:
java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Buffer.java:495)
at java.nio.HeapCharBuffer.put(HeapCharBuffer.java:145)
at com.sun.tools.javac.util.DefaultFileManager.decode(DefaultFileManager.java:830)
at com.sun.tools.javac.util.DefaultFileManager.access$300(DefaultFileManager.java:76)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1353)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1252)
at com.sun.tools.javac.main.JavaCompiler.readSource(JavaCompiler.java:483)
at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:550)
at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:541)
at com.sun.tools.javadoc.JavadocTool.getRootDocImpl(JavadocTool.java:126)at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:330)
at com.sun.tools.javadoc.Start.begin(Start.java:128)
at com.sun.tools.javadoc.Main.execute(Main.java:41)
at com.sun.tools.javadoc.Main.main(Main.java:31)
Has anybody ever had problems with the javadoc tool causing a java.nio.BufferOverflowException?
I'm trying to generate Javadoc for code with Japanese comments (charset MS932). I think that might be related. Does anybody know of a workaround for this problem?
Here's the stacktrace:
java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Buffer.java:495)
at java.nio.HeapCharBuffer.put(HeapCharBuffer.java:145)
at com.sun.tools.javac.util.DefaultFileManager.decode(DefaultFileManager.java:830)
at com.sun.tools.javac.util.DefaultFileManager.access$300(DefaultFileManager.java:76)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1353)
at com.sun.tools.javac.util.DefaultFileManager$RegularFileObject.getCharContent(DefaultFileManager.java:1252)
at com.sun.tools.javac.main.JavaCompiler.readSource(JavaCompiler.java:483)
at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:550)
at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:541)
at com.sun.tools.javadoc.JavadocTool.getRootDocImpl(JavadocTool.java:126)at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:330)
at com.sun.tools.javadoc.Start.begin(Start.java:128)
at com.sun.tools.javadoc.Main.execute(Main.java:41)
at com.sun.tools.javadoc.Main.main(Main.java:31)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的猜测是字符编码设置不正确。
My guess is character encoding is not set up right.