I figure something isn't typed correctly and it's just impossible for me to see it, either that or I am missing something fundamentally easy regrading how to use packages. Anyways, any help anyone can give me would be greatly appreciated.
I'm on an Windows 2000 machine with SDK version 1.5 [ June 28, 2005: Message edited by: Nicholas Carrier ]
Teaching yourself anything is always the cheapest way, but it definitely takes a lot of time and effort.<br /> <br />Thank you javaranch <a href="http://"http://faq.javaranch.com/view?HowToAskQuestionsOnJavaRanch"" target="_blank" rel="nofollow">Learn How to Ask Your Question</a> and be nice
I'm sorry, you lost me. So everytime I create a package, I have to add that to my CLASSPATH if I want to import it, or compile with the -classpath command? You would think that somewhere in the Head First series they would have explained this to me. Anyways, I'll give it a try, and let you know.
Thanks for your help.
Joined: Apr 14, 2005
Ok, so I added the file to my CLASSPATH, because if I just use that one file for my CLASSPATH when compiling, it won't compile because it's also looking for servlets.
And I still receive the same error when I try to compile the code.
Thanks again for your help, I really appreciate it.
P.S. I only use bold type to make it easier to read, I'm not screaming or getting mad or anything. Sometimes it easier on the eyes when certain things are a little different. [ June 28, 2005: Message edited by: Nicholas Carrier ]
You don't need individual class files or even packages enumerated on your classpath, just the direcotries that contain them.
For instance if the class file com.wittycritics.model.BeerExpert is in C:\MyProjects\beerV1\classes\com\wittycritics\model\BeerExpert.class then you need to put C:\MyProjects\beerV1\classes on your classpath. Javac will automatically convert the package and class names into directory and file names.
You can have a bunch of packages rooted in a single direcotry on the classpath. For instance, C:\MyProjects\beerV1\classes might contain com/wittycritics, com/somethirdparty, org/someoneelse, etc.
...the src/com/wittycritics/web/BeerSelect.java argument wasn't part of the classpath; it was telling javac what file to compile. Only src was part of the classpath, and it was needed so that javac could find BeerExpert when compiling BeerSelect.
Given that you need some apache classes, your classpath should be...
This is why the ranch is the best! Thanks again. Although I'm still relativley surprised that this wasn't explained anywhere, in anything I've read so far, which makes me wonder if I'm reading the right material, lol. Anyways, off to the servlet world I go!
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com