Remote Debug issue

Hi all,

I would like to use IDEA 3.0 for remote debugging. This is my first foray into remote debugging, and I can't get out of the gate. BTW, I'm on Windows 2000. I figured I'd start with a HelloWorld type example. So I created:

import java.awt.*;

public class HelloWorld {
public static void main(String[] args) {
Toolkit.getDefaultToolkit().beep();
}
}

Works like a charm if I just run it in IDEA.

So I compiled it with Suns JDK 1.3 and clicked the debug icon. Tabbing to Remote, transport is Socket, Mode is Attach, Host is localhost (figured I'd start locally, but moving it to another networked machine gave the same error), Port is 1717.

I then opened a Command Propmt window, and typed c:\Java\jdk1.3\bin\java -X... (all the stuff the IDEA remote debug panel says to type) HelloWorld.

What I get is "Exception in Thread "main" java.lang.NoClassDefFoundError: HelloWorld

I've tried JDKs from 1.2 to 1.4, no luck, same error. My guess is that it's a CLASSPATH issue, but I don't know. Any hints?

TIA,

Mark

1 comment
Comment actions Permalink

I then opened a Command Propmt window, and typed c:\Java\jdk1.3\bin\java -X... (all the stuff the IDEA remote debug panel says to

type) HelloWorld.
>

What I get is "Exception in Thread "main" java.lang.NoClassDefFoundError: HelloWorld


I can guess 2 reasons:
1. the jvm cannot find your class in the classpath when you start it from the command line. Please check that the directory where
your classes were compiled, is in classpath.
2. If you are using jdk 1.3.1_07 or higher, the jvm throws such exception on attempt to launch it in classic mode with debug
parameters. The cure is not to use -classic option fr such JDKs

Anyway, I think that it is (1) because you are getting the error for 1.4 as well.


--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"



0

Please sign in to leave a comment.