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");
}
}
精彩评论