Problem in runing the jdb examples!
Hi,everyone:
As a part of my research project, I need catch the type of variables dynamically.So I decided to use the JDI.
First I want to compile and run the jdb example. But I got a problem.
When I use Eclipse, it run fine. But when I use the command line mode, I got a error:
Exception in thread "main" java.lang.NoClassDefFoundError: TTY (wrong name: com/sun/tools/example/debug/tty/TTY)
at java.lang.ClassLoader.defineClass0(Native Method)
I don't konw why? Is there anyone can help me?
Thank you!!
Duanyh
SJTU
[580 byte] By [
duanyha] at [2007-9-29 15:01:55]

Hello
You wrote:
> [...]when I use the
> e command line mode, I got a error:
> Exception in thread "main"
> n" java.lang.NoClassDefFoundError: TTY (wrong name:
> com/sun/tools/example/debug/tty/TTY)
> at java.lang.ClassLoader.defineClass0(Native
> ve Method)
>
>I don't konw why?
Because the name of the main class is not TTY. It
is com.sun.tools.example.debug.tty.TTY
For more information on handling packages, refer to this page:
"Creating and Using Packages"
http://java.sun.com/docs/books/tutorial/java/interpack/packages.html
For an example of how to compile and run TTY (the jdb debugger),
take a look at this forum thread:
http://forum.java.sun.com/thread.jsp?forum=47&thread=453776
> Is there anyone can help me?
>Thank you!!
>
> Duanyh
> SJTU