Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Eric Fancis
Greenhorn
Posts: 29
  • 0
  • 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
  • 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: 5115
11
Java Netbeans IDE Opera
  • 0
  • 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
Pie
Posts: 47293
52
  • 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
  • 0
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic