# classpath problem

Rahul Sudip Bose
Ranch Hand
Posts: 637
I am unable to compile a simple servlet. I think that it is because of my classpath.

I have set the classpath for tomcat in "environment variables". Now, i want to compile my java file which is in R drive and uses :-
>tomcat jar files which are in C drive.
>a class "BeerSelect" in my project folder - R:\MyProjects\beerV1\src\com\example\web

here is the problem in compiling :

My directory structure for the project :

Greg Brannon
Bartender
Posts: 563
• 1
Part of the problem is with your javac command line. Spaces are interpreted as breaks between command line arguments. I believe you have to surround an argument that includes spaces with quotes.

Rahul Sudip Bose
Ranch Hand
Posts: 637
how can i correct it ?

Ulf Dittmer
Rancher
Posts: 42970
73
Did you try what Greg suggested?

Campbell Ritchie
Marshal
Posts: 52580
119
. . . and it is usually does more harm than good to set a classpath system environment variable, unless there was something already set by another application.