• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 7
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 79178
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic