我的JAVA错在哪?
xgd 2005-01-28 12:58:05 各位网友,本人初学Java,我所写的程序怎样都不能通过编译,照着书上写的都不行,是我的Windows系统设置不对吗,我照着书上说的那样设都不行。请各位高人祥细的教教本人,我就感激万分。
如程序import java.awt.Point;
class ReferencesTest{
public static void main(String[] arguments){
Point pt1,pt2;
pt1=new Point(100,100);
pt2=pt1;
pt1.x=200;
pt1.y=200;
System.out.println("Point1"+ pt1.x + "," + pt1.y);
System.out.println("Point1"+ pt2.x + "," + pt2.y);
}
}
它能通过:javac ReferencesTest.java 产生ReferencesTest.class
但通过:java ReferencesTest时它提示
Exception in thread "main" java.lang.NoClass DefFoundError;ReferencesTest
,请问到底错在哪
我已设了我的电脑-->属性-->高级-->环境变量-->新建-->path-->C:\j2sdk1.4.0_01\bin;