开发者

How do you run DDD for Java?

开发者 https://www.devze.com 2023-02-24 09:03 出处:网络
I was following this tutorial here and got a popup that says \"cannot access class test\" after I typed in

I was following this tutorial here

and got a popup that says "cannot access class test" after I typed in

%javac -g test.java
%ddd -jdb test &
开发者_开发问答


When using DDD to debug java you must, as well as following the steps in the example you have provided, set the classpath that JDB uses to find your files. Otherwise you will see the message 'Cannot Access Class Test' that you are seeing.

To do this, in DDD click Edit, then JDB Settings, then type '.' (not including quote marks) in the classpath field. This will cause JDB to search in the current directory when looking for your example java code.

For more information about the java classpath and what it does, see

http://en.wikipedia.org/wiki/Classpath_%28Java%29

Hope this helps.

John


%javac -g test.java
%ddd -jdb test &

simple java program that works with these commands:

class test{

static public void Main(String[] args){
    System.out.println("hello");
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消