This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply 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: 27
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: 4165
    
    3

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: 32689
    
    4
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: 27
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: javac: not a directory: src\com\example\web\BeerSelect.java
 
Similar Threads
Command line arguments
cannot compile servlet
Need help in compiling programs
Getting package and class exceptions with the BeerAcvice web app!!! Pls Help
problems when reading Head.First.Servlets.and.JSP.2nd.Edition