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 Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javac: not a directory: src\com\example\web\BeerSelect.java

 
Eric Fancis
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am on chapter 3 of Headfirst Servlets and JSP.

This is my input to windows 7 command line:
D:\Workspaces\ServletsJSP\MyProjects\beerV1>javac -classpath C:\Tomcat\tomcat\lib\servlet-api.jar;classes;. -d src\com\example\web\BeerSelect.java

This is the error message:
javac: not a directory: src\com\example\web\BeerSelect.java
Usage: javac <options> <source files>
use -help for a list of possible options

I have BeerSelect.java in this directory: D:\Workspaces\ServletsJSP\MyProjects\beerV1\src\com\example\web
 
Rajeev Motha
Greenhorn
Posts: 7
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric,

This is expected.
If you type javac -help you will see that -d is to specify the directory of the generated class files. And since "src\com\example\web\BeerSelect.java" is not a directory, it is stating that.

Cheers,
Code On!
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric, you never did return to the first thread you started, not even to SayThanks <-- link.

Hope you won't vanish again this time round.
 
Campbell Ritchie
Sheriff
Posts: 48424
56
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you need to specify a directory after -d. If you start off in the directory where all your source files are, -d . is a likely place to try first.
 
Eric Fancis
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajeev Motha wrote:Hi Eric,

This is expected.
If you type javac -help you will see that -d is to specify the directory of the generated class files. And since "src\com\example\web\BeerSelect.java" is not a directory, it is stating that.

Cheers,
Code On!


Thanks, I did forget to put -d classes
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic