My Java version is 1.8.0_6. The JDB on my laptop can be started with a .class file, say MyClass.class. But after I type
run
conmmand, JDB first gives me a prompt "run MyClass", then it is stuck for a while. After that, it throws out the following error information,
VM start exception: VM initialization failed for: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/bin/java -Xdebug -Xrunjdwp:transport=dt_socket,address=promote.cache-dns.local:58261,suspend=y DebugMe
ERROR: transport error 202: connect failed: Operation timed out ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
Fatal error: Target VM failed to initialize.
I have been compiling and running Java programs with "javac" and "java" properly in recent days. But I never used jdb before. Could anybody help me with this? Thanks in advance.