aspose file tools*
The moose likes Beginning Java and the fly likes javac: not a directory: src\com\example\web\BeerSelect.java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "javac: not a directory: src\com\example\web\BeerSelect.java" Watch "javac: not a directory: src\com\example\web\BeerSelect.java" New topic
Author

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

Eric Fancis
Greenhorn

Joined: Jun 14, 2011
Posts: 29
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


http://www.h4t3r.com
Rajeev Motha
Greenhorn

Joined: Apr 05, 2012
Posts: 7
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

Joined: May 03, 2008
Posts: 4542
    
    5

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.


luck, db
There are no new questions, but there may be new answers.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38793
    
  23
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

Joined: Jun 14, 2011
Posts: 29
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
 
subject: javac: not a directory: src\com\example\web\BeerSelect.java