Categories
java

Dang You: Cygwin, Windows, and…

What in the world!!!!!!

Why? Why? Why?

Dang it! Dang it! Dang it!

I hate when I can’t figure out something that ends up being an easy, stupid “thing” to fix.

Currently, I’m stuck with a compile/ classpath/ “class or package not found” problem.

I have an XP desktop at work. I normally am ssh’ed into a Solaris box. When working in the Solaris World I never have any of these compile/ classpath problems. Unfortunately, I’m working on my XP box right now. To make it act more like a Unix box I run everything from a Cygwin prompt. For the most part I don’t have any problems and am happy. Not the case today!

All I’m trying to do is compile a servlet. No big deal. Just add the servlet-api to my classpath and compile away. Right? Wrong! I keep getting errors saying that friggin’ package javax.servlet and javax.servlet.http don’t exist. Well, that’s crap. They do exist and I’ve included them in the classpath.

javac -classpath /cygdrive/c/java/tomcat-5.0.28/common/lib/servlet-api.jar:. -d classes src/com/example/web/*.java

I have no idea why that doesn’t work. When I use that same javac cmd from a cmd prompt it works fine. It makes no sense.

I’ll post an update when I figure out my stupid mistake.

Leave a Reply

Your email address will not be published. Required fields are marked *