I am trying to run Trace.java program that comes as a sample as part of Java Debugger Interface. This program provides command line trace of any input java program to it. It expects the name of java program to be traced as parameter.
This Trace.java is located in package "com.sun.tools.example.trace". The online location of Trace.java is at :-
http://www.docjar.com/html/api/com/sun/tools/example/trace/Trace.java.html
And I pass another class to be traced as argument to this program called as Client.java which is located at package "com.sun.tools.example.trace". Both Trace.java and Client.java are part of same java project. Now when I try to run Trace.java using argument "com.sun.tools.example.trace.Client" I get below exception in my console:-
java.lang.NoClassDefFoundError: com/sun/tools/example/trace/Client
Caused by: java.lang.ClassNotFoundException: com.sun.tools.example.trace.Client
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.sun.tools.example.trace.Client. Program will exit.
Exception in thread "main" -- VM Started --
-- The application exited --
Any idea why I am getting this error though Client.java is present at correct path as provided in argument to Trace.java?
Many thanks in advance.
-Pras