Dear All,

I am trying to learn j2ee from the basics. I have written a basic program from my guidance book and when i try to compile it , i get the below error.
Please throw some light on it.

javac -classpath C:/Program Files (x86)/Apache Software Foundation/Tomcat 7.0/lib/servlet-api.jar:classes:. -d classes src/com/example/web/BeerSelect.java
javac: invalid flag: (x86)/Apache
Usage: javac <options> <source files>
use -help for a list of possible options

I suspect your problem has to do with whitespaces. Try enclosing the path in quotes("):

javac -classpath "C:/Program Files (x86)/Apache Software Foundation/Tomcat 7.0/lib/servlet-api.jar":classes:. -d classes src/com/example/web/BeerSelect.java

Hi tinstaafl,

Thanks for the advise, its working now !!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.