simple question learning java from sum.com

Dear all,

I follow http://java.sun.com/docs/books/tutorial/java/javaOO/classes.html to learn java.

1. I create a project called Bicycle

2. I create a Bicycle.java under project Bicycle

3. I create a MountainBike.java also under project Bicycle

I try to make the project MountainBike.java work. However, netbean come out the following. I don't understand what that means. Please help

init:

deps-jar:

Created dir: C:\Users\Marco\Bicycle\build\classes

Compiling 1 source file to C:\Users\Marco\Bicycle\build\classes

C:\Users\Marco\Bicycle\src\bicycle\MountainBike.java:16: cannot access bicycle.Bicycle

bad class file: C:\Users\Marco\Bicycle\src\bicycle\Bicycle.java

file does not contain class bicycle.Bicycle

Please remove or make sure it appears in the correct subdirectory of the classpath.

public class MountainBike extends Bicycle{

BUILD FAILED (total time: 0 seconds)

[970 byte] By [marco_wua] at [2007-11-27 7:04:19]
# 1
Don't crosspost. http://forum.java.sun.com/thread.jspa?threadID=5182260
jverda at 2007-7-12 18:55:36 > top of Java-index,Java Essentials,New To Java...
# 2
I am so sorry, but please help. I promise no crosspost again
marco_wua at 2007-7-12 18:55:36 > top of Java-index,Java Essentials,New To Java...
# 3

> 1. I create a project called Bicycle

<snip/>

> 6: cannot access bicycle.Bicycle

> bad class file:

> C:\Users\Marco\Bicycle\src\bicycle\Bicycle.java

> file does not contain class bicycle.Bicycle

> Please remove or make sure it appears in the correct

> subdirectory of the classpath.

> public class MountainBike extends Bicycle{

> BUILD FAILED (total time: 0 seconds)

These package names are case-sensitive, so if you say

package Bicycle;

then you really need a directory called Bicycle (not bicycle).

If you haven't added a package statement, then the classes need to be in the same directory, and that's where you need to compile from.

kevjavaa at 2007-7-12 18:55:36 > top of Java-index,Java Essentials,New To Java...
# 4
You need to learn about packages. http://java.sun.com/docs/books/tutorial/java/package/index.html
jverda at 2007-7-12 18:55:36 > top of Java-index,Java Essentials,New To Java...
# 5
I seeThanks a lot
marco_wua at 2007-7-12 18:55:36 > top of Java-index,Java Essentials,New To Java...