JDK-4428270 : JDI: Unable to launch a debugee program with vmexec=java_g
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2001-03-21
  • Updated: 2001-04-20
  • Resolved: 2001-04-20
Related Reports
Relates :  
Relates :  
Description

Name: tb29552			Date: 03/21/2001


Using jdb as an example, this works fine:

% jdb -connect "com.sun.jdi.CommandLineLaunch:main=HelloWorld"
Initializing jdb...
> run
run HelloWorld
>
VM Started: Hello, world!

The application exited


But this fails:

% jdb -connect "com.sun.jdi.CommandLineLaunch:main=HelloWorld:vmexec=java_g"
Initializing jdb...
> run
run HelloWorld:vmexec=java_g
>
VM Started:
Exception occurred: java.lang.ClassNotFoundException (uncaught) thread="main",
java.net.URLClassLoader$1.run(), line=200, bci=72

main[1] cont
>
Exception occurred: java.lang.ClassNotFoundException (uncaught) thread="main",
java.net.URLClassLoader.findClass(), line=205, bci=28

main[1]

======================================================================

Comments
EVALUATION tim.bell@Eng 2001-04-17 java_g and the ClassNotFoundException is a red herring. What is significant is the relative position of the "vmexec" Connector Argument on the command line. Both of these work fine: jdb -connect "com.sun.jdi.CommandLineLaunch:vmexec=java,main=HelloWorld" jdb -connect "com.sun.jdi.CommandLineLaunch:vmexec=java_g,main=HelloWorld" Both of these will fail: jdb -connect "com.sun.jdi.CommandLineLaunch:main=HelloWorld:vmexec=java" jdb -connect "com.sun.jdi.CommandLineLaunch:main=HelloWorld:vmexec=java_g" tim.bell@Eng 2001-04-20 My earlier evaluation was mistaken. The connector strings used are not valid. Reference: http://java.sun.com/j2se/1.3/docs/guide/jpda/conninv.html The correct strings would look like this: jdb -connect "com.sun.jdi.CommandLineLaunch:main=HelloWorld,vmexec=java" jdb -connect "com.sun.jdi.CommandLineLaunch:main=HelloWorld,vmexec=java_g" As a side note, any arguments that you want to pass to the debugee class (HelloWorld in this example) must be specified as part of the "main=" connector argument. For example: jdb -connect 'com.sun.jdi.CommandLineLaunch:main=HelloWorld 1 2 "3 4",vmexec=java' The HelloWorld class will see: args[0] is: 1 args[1] is: 2 args[2] is: 3 4
11-06-2004

PUBLIC COMMENTS .
10-06-2004