|
Apple.java
[food]-------fruit.java
注:food 是一目录,下面有一个fruit.java文件
fruit.java源码: 代码:
package food;
public abstract class fruit
{}
Apple.java源码: 代码:
package food;
import food.fruit;
class Apple extends fruit
{}
javac Apple.java
1. ERROR in Apple.java (at line 2)
import food.fruit;
^^^^^^^^^^
The import food.fruit cannot be resolved
----------
2. ERROR in Apple.java (at line 3)
class Apple extends fruit
^^^^^
fruit cannot be resolved to a type
----------
2 problems (2 errors)j
在Win下,编译没有这样的问题。可以通过。我怀疑是我Ubuntu的java配置有问题。
我配置是按照Wiki上的提示配置的。我想知道问题出在哪?另外wiki上配置java似乎没有设置CLASS_PATH,会不会是这个问题? |
|