Hello. I've been putting off putting my own classes into packages for too long now.
I've read the sun tutorials and some other tutorials but for some reason i'm still having trouble and i was hoping if i just write down exactly what i've been doing someone could tell me what i'm doing wrong.
I've started reading "Devloping Games In
Java " by Daivd Brackeen, and in chapter 3 he tells the reader to put some of the example classes that were in the book into their own package so we can keep using them with future examples. So this is what I've tried...
The package is called com.brackeen.javagamebook.graphics . So I created a folder named "com" and inside that folder i created a folder named "brackeen" and inside that folder created a folder named "javagamebook" and inside that folder i created a folder named "graphics". Inside the graphics folder i placed the source code for a class called "ScreenManager", (which is one of the classes i need to reuse). At the top of class I wrote the package statment and then i complied it, so the class file is in the same folder as the source.
Then in the command line i went back to the directory which all the other classes in that project are in and tried to compile the project. One of the classes in the project uses the class "SimpleScreenManger" so it has an import statement importing the package that it is in. I get this error when I try to compile...
I know i shouldn't be having as much trouble as I am but for some reason the tutorials leave me confused about exactly what i'm supposed to do when compiling classes that use classes that are in a package i have made.