简体   繁体   English

jdb 无法识别“--add-reads”选项

[英]jdb not recognizing '--add-reads' option

I'm working on a project where an invocation of a java file is returning a NullPointerException, but I'm not getting any clues as to why, so I'd like to run it through jdb.我正在开发一个项目,其中调用 java 文件返回 NullPointerException,但我没有得到任何关于原因的线索,所以我想通过 jdb 运行它。 According to to this page, I should be able to simply replace the call to java with jdb , but when I do, I'm getting the error:根据这个页面,我应该可以简单地用jdb替换对java的调用,但是当我这样做时,我得到了错误:

/auto/tools/java/jdk-14.0.1/bin/jdb --add-reads stringtemplate=foostring  -p ./tools/foo:./tools/bar -m foo/com.bar.foo.FOO  -tp ./bar/ -p -o bin/foo -i foo.in

invalid option: --add-reads

Is there a trick I'm missing to allow me to pass all these options to jdb?是否有一个技巧可以让我将所有这些选项传递给 jdb?

Java commands (java, javac, jdb) do not use the GNU double-dash convention. Java 命令(java、javac、jdb)不使用 GNU 双破折号约定。 Use a single dash.使用单个破折号。

Or if that's an option for the program itself, it should probably come after the class name.或者,如果这是程序本身的一个选项,它可能应该在 class 名称之后。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM