aspose file tools*
The moose likes Beginning Java and the fly likes classpath problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "classpath problem" Watch "classpath problem" New topic
Author

classpath problem

Rahul Sudip Bose
Ranch Hand

Joined: Jan 21, 2011
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 :


Please help me to overcome this problem.


SCJP 6. Learning more now.
Greg Brannon
Bartender

Joined: Oct 24, 2010
Posts: 561
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.


Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
Rahul Sudip Bose
Ranch Hand

Joined: Jan 21, 2011
Posts: 637

how can i correct it ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
Did you try what Greg suggested?


Ping & DNS - my free Android networking tools app
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39388
    
  28
. . . 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: classpath problem