我正在为JMeter开发插件,我想在运行时从Intellij IDEA连接到jmeter server。我已经向jmeter.bat添加了以下字符串:
set JVM_ARGS=-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=1099, suspend=n但是当我尝试连接时,我收到以下错误:
Listening for transport dt_socket at address: 1099
java.lang.NoClassDefFoundError: suspend=n
Caused by: java.lang.ClassNotFoundException: suspend=n
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: suspend=n. Program will exit.
Exception in thread "main" errorlevel=1我在同一台机器上启动了jmeter和jmeter server,但为jmeter server指定了端口。你能给我解释一下,我做错了什么吗?
我尝试删除JVM_ARGS中的额外空间,但仍然出错:
Found ApacheJMeter_core.jar
Listening for transport dt_socket at address: 1099
Created remote object: UnicastServerRef [liveRef: [endpoint:[192.168.56.1:50900](local),objID:[-6928e8c:13b637ed53e:-7fff, 6493737834091623438]]]
Problem creating registry: java.rmi.server.ExportException: Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
Continuing...
Server failed to start: java.rmi.RemoteException: Cannot start. See server log file.; nested exception is:
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException
An error occurred: Cannot start. See server log file.; nested exception is:
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException
Debugger failed to attach: timeout during handshake我是不是遗漏了什么?
发布于 2012-12-03 18:00:52
在suspend参数之前有一个额外的空格,这会使JVM将其解释为第一个非选项参数(即主类名称)。
尝试将上面的代码行替换为:
set JVM_ARGS=-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=1099,suspend=nhttps://stackoverflow.com/questions/13680582
复制相似问题