java 如何在intellij idea VM Options中设置javaagent?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/45115208/
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
How to set javaagent in intellij idea VM Options?
提问by hybrid
I am using Intellij Idea for development. I want to add log monitoring using
我正在使用 Intellij Idea 进行开发。我想使用添加日志监控
and I am following their guide on setting javaagent from the below link
我正在按照他们关于从以下链接设置 javaagent 的指南进行操作
http://support.stackify.com/hc/en-us/articles/211497443-How-to-Enable-Java-Profiling-with-Prefix
http://support.stackify.com/hc/en-us/articles/211497443-How-to-Enable-Java-Profiling-with-Prefix
When I run the project , I am getting the following error
当我运行项目时,出现以下错误
IIntellij is reading the path till the first space only.
IIntellij 正在读取直到第一个空格的路径。
Kindly help me solve the issue. Thanks
请帮我解决问题。谢谢
回答by bowmore
You should put the file path in double quotes :
您应该将文件路径放在双引号中:
-javaagent:"C:\Program Files (x86)\StackifyPrefix\java\lib\stackify-java-sprn.jar"
回答by SteveVg
Double quotes method explained by bowmore didn't work for me, had to go the slash way:
bowmore 解释的双引号方法对我不起作用,不得不采用斜线方式:
-javaagent:C:/Program Files (x86)/StackifyPrefix/java/lib/stackify-java-sprn.jar