包里的文件该如何编译?
xmzw 2005-01-13 11:29:03 新手入门,大家莫笑
//test.java
package mytest;
public class test{
public test(){
System.out.println("hello");
}
}
.
.
.
//test1.java
package mytest;
public class test1{
public static void main(String[] args){
test t=new test();
...
}
}
编译时进入到mytest目录,javac test.java成功,javac test1.java时出现以下错误:
test1.java:5: cannot find symbol
symbol : class test
location: class mytest.test1
test t=new test();
^
test1.java:5: cannot find symbol
symbol : class test
location: class mytest.test1
test t=new test();
^
2 errors
请问该如何编译?