This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classpath problem

 
Rahul Sudip Bose
Ranch Hand
Posts: 637
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Greg Brannon
Bartender
Posts: 563
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i correct it ?
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try what Greg suggested?
 
Campbell Ritchie
Sheriff
Posts: 48402
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic