【菜鸟提问】java不同包引用问题
我有两个java文件分别位于不同的包中,其中Student.java在d:\ceshi\studentinfo, StudentTest.java在d:\ceshi\test中。其中StudentTest用到了studentinfo中的类Student.但是在test目录编译的时候总是提示软件包studentinfo不存在。(Student中已有语句package studentinfo;)请各位高手指教是什么原因?
StudentTest代码如下:
package test;
import junit.framework.*;
import studentinfo.*;
public class StudentTest extends TestCase {
public void testCreate() {
final String firstStudentName = "Jane Doe";
Student firstStudent = new Student(firstStudentName);
assertEquals(firstStudentName, firstStudent.getName());
final String secondStudentName = "Joe Blow";
Student secondStudent = new Student(secondStudentName);
assertEquals(secondStudentName, secondStudent.getName());
}
}