Eclipse 中的默认 VM 参数:-javaagent
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17982795/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 21:00:35 来源:igfitidea点击:
Default VM Arguments in Eclipse : -javaagent
提问by Ashish Agarwal
I need to set the following argument as the Default VM Arguments in Eclipse
我需要将以下参数设置为 Eclipse 中的默认 VM 参数
-javaagent /Developer/aspectj-1.6/aspectjweaver.jar
When I add the line and run my code, it gives me the error:
当我添加该行并运行我的代码时,它给了我错误:
Unrecognized option: -javaagent
Could not create the Java virtual machine.
How do I fix this ?
我该如何解决 ?
回答by Edward Thomson
You need a colon (:
) between the -javaagent
and the JAR, not a space. For example:
和 JAR:
之间需要一个冒号 ( ) -javaagent
,而不是空格。例如:
-javaagent:/Developer/aspectj-1.6/aspectjweaver.jar