【问题标题】:unable to run jvm with attached profiler无法使用附加的探查器运行 jvm
【发布时间】:2014-04-28 23:20:06
【问题描述】:

我无法使用以下命令在 linux 上启动带有附加配置文件的 jvm:

java -Xverify:none -agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf TestClass

我收到以下错误:

Error occurred during initialization of VM
agent library failed to init: JPIBootLoader
CGProf: command not found

在 windows 上,上述命令运行成功,我从类的 main 方法收到消息。

Linux 详情

uname -aLinux michael 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

LD_LIBRARY_PATH=/home/michael/eclipse/tptp/agntctrl.all_platforms-TPTP-4.7.2/linux_em64t/lib/:/home/michael/eclipse/tptp/linux.gtk.x86-TPTP-4.7。 2/plugins/org.eclipse.tptp.platform.jvmti.runtime_4.6.3.v201102041710/agent_files/linux_em64t/

TPTP_AC_HOME=/home/michael/eclipse/tptp/agntctrl.all_platforms-TPTP-4.7.2/linux_em64t

【问题讨论】:

    标签: java jvm eclipse-tptp


    【解决方案1】:

    分号导致问题。在 linux 中,; 是同一行上两个单独命令之间的分隔符。与其将事物解释为单个命令,不如将其视为两个命令

    java -Xverify:none -agentlib:JPIBootLoader=JPIAgent:server=enabled;
    

    CGProf TestClass
    

    两者都失败了。尝试使用双引号,这将防止外壳拆分它

    java -Xverify:none -agentlib:"JPIBootLoader=JPIAgent:server=enabled;CGProf" TestClass
    

    您可能需要尝试放置引号的最佳位置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-18
      • 1970-01-01
      • 2023-01-22
      • 1970-01-01
      相关资源
      最近更新 更多