5。编译后出现的问题!
--------------------Configuration: JDK version 1.4 <Default>--------------------
D:\Java\ComputerTime.java:17: cannot access Common
bad class file: D:\Java\Common.java
file does not contain class Common
Please remove or make sure it appears in the correct subdirectory of the classpath.
Common d=(Common) Class.forName("pkg1."+args[0]).newInstance();
^
1 errorProcess completed.
--------------------Configuration: JDK version 1.4 <Default>--------------------
D:\Java\ComputerTime.java:17: cannot access Common
bad class file: D:\Java\Common.java
file does not contain class Common
Please remove or make sure it appears in the correct subdirectory of the classpath.
Common d=(Common) Class.forName("pkg1."+args[0]).newInstance();
^
1 errorProcess completed.
file->new->project(指定工程路径,默认在JCreator安装目录内)添加已有ComputeTime.java,Plane.java,Car007.java和接口Common.java文件
vies->file view->出现的窗口内右击src->add->add existing file->分别添加上述文件编译
build->build project2、尝试import pkg1.pkg2.Common;
以后还希望你能多指点小弟!
再次说次谢谢!
哪为什么 ?import g1.pkg2.*;就不行呢?
javac Plane.java
...