I'm using Tomcat 4.04 on Win2k and was getting a java.lang.NoClassDefFound error when I try to include and reference classes I created myself that are in the local classpath. This machine is my development workstation, and I really wanted to be able to modify, recompile, and test the classes where they reside without making JARs or moving the classes out of my standard development classpath that is used by servlets and non-servlets. I searched this newsgroup and found others with the same problem, but no solution that didn't require moving the classes. My solution is to edit c:\tomcat\bin\setclasspath.bat to include the path of my standard libraries' root. Simple, obvious and effective. Maybe this will help someone else...
I do the same as William. I think it's a bit of a dangerous idea to set the classpath to point all over the place. Also I'd much rather that my development environment match the production environment as much as possible. Makes for a lot fewer gotchas at deployment time. Just my way, bear
Thanks for the feedback. I should point out that I am still learning Java (got to escape the clutches of Microsoft at some point), and none of my code goes into production at this point. For more effective learning, I'm taking quick shortcuts that I agree would not be appropriate in a "real" setting. I'm also just getting into Ant and will implement your suggestion when I get a chance. Thanks again.
Author and all-around good cowpoke
Joined: Mar 22, 2000
ANT has a steep learning curve but I'll never go back! I use UltraEdit-32 which lets me define projects and project specific Ant tasks.
mlweber, Please change your name to be compliant with JavaRanch's naming policy. It should not be obviously fictitious. Your displayed name should be 2 separate names with more than 1 letter each. We really would prefer that you use your REAL name. You can change your name: here. Thanks, Cindy
"JavaRanch, where the deer and the Certified play" - David O'Meara
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