jdb - Fatal error : unable to launch target VM -
i new java , jdb ,trying debug example program :
foo.java class foo { public static void main(string[] args){ system.out.println("chexking dalvik virtual machine on system"); } } compiled -g flag . javac -g foo.java compiled . tried run program using command >java foo got output . tried run : jdb foo c:\users\test\workspace\samplejava>jdb foo initializing jdb ... > stop in foo.main deferring breakpoint foo.main. set after class loaded. > run main run main java.io.ioexception: cannot run program "c:\program": createprocess error=2, system cannot find file specified @ java.lang.processbuilder.start(processbuilder.java:470) @ java.lang.runtime.exec(runtime.java:593) @ java.lang.runtime.exec(runtime.java:466) @ com.sun.tools.jdi.abstractlauncher$helper.launchandaccept(abstractlauncher.java:162) @ com.sun.tools.jdi.abstractlauncher.launch(abstractlauncher.java:114) @ com.sun.tools.jdi.suncommandlinelauncher.launch(suncommandlinelauncher.java:217) @ com.sun.tools.example.debug.tty.vmconnection.launchtarget(vmconnection.java:334) @ com.sun.tools.example.debug.tty.vmconnection.open(vmconnection.java:166) @ com.sun.tools.example.debug.tty.commands.commandrun(commands.java:589) @ com.sun.tools.example.debug.tty.tty.executecommand(tty.java:474) @ com.sun.tools.example.debug.tty.tty.<init>(tty.java:707) @ com.sun.tools.example.debug.tty.tty.main(tty.java:1011) caused by: java.io.ioexception: createprocess error=2, system cannot find file specified @ java.lang.processimpl.create(native method) @ java.lang.processimpl.<init>(processimpl.java:177) @ java.lang.processimpl.start(processimpl.java:28) @ java.lang.processbuilder.start(processbuilder.java:452) ... 11 more fatal error: unable launch target vm. to knowledge : jdb unable load class . there path setting need set jdb . (i trying follow tutorial)
i think missing basic thing. tried google same think couldnt resolve problem .
my path=%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;%systemroot%\system32\windowspowershell\v1.0\;c:\cygwin\;c:\users\test\downloads\adt-bundle-windows-x86-20130219\adt-bundle-windows-x86-20130219\sdk\platform-tools\;"c:\program files\java\jre1.6.0_16\bin";"c:\program files\java\jre6\bin";"c:\program files\java\jdk1.6.0_45\bin";c:\users\test\downloads\adt-bundle-windows-x86-20130219\adt-bundle-windows-x86-20130219\sdk\tools;"c:\program files\graphviz2.26.3\bin";"c:\program files\graphviz2.26.3\bin" c:\users\test\workspace\samplejava>java -version java version "1.6.0_45" java(tm) se runtime environment (build 1.6.0_45-b06) java hotspot(tm) client vm (build 20.45-b01, mixed mode, sharing)
c:\users\test\workspace\samplejava>javac -version javac 1.6.0_45
os: windows 7
had same problem - appears caused jdk being installed in folder space in path, i.e., "program files" - moved jdk installation c:\jdk , problem went away.
Comments
Post a Comment