wood burning stoves*
The moose likes Beginning Java and the fly likes Javac:File Not Found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Javac:File Not Found" Watch "Javac:File Not Found" New topic
Author

Javac:File Not Found

Arun Giridharan
Ranch Hand

Joined: Sep 30, 2010
Posts: 290

I feel Awkward ,

JK ~/Work-Space/Servlet/My Project/init-paramV1 $ javac -classpath /usr/share/tomcat6/lib/servlet-api.jar:classes:. -d classes src/com/example/web/initParam.java
javac: file not found: src/com/example/web/initParam.java
Usage: javac <options> <source files>
use -help for a list of possible options

i'm using Linux,i'm getting those errors file not found, i though there is some problem with ClassPath everything seems to be fine ,i'm not able to get what is the reason i'm getting this error and even path is correct and i'm in the respective folder/file too.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Try another . after -d
Arun Giridharan
Ranch Hand

Joined: Sep 30, 2010
Posts: 290

INValid Flag
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

Arun Giridharan wrote:and i'm in the respective folder/file too.


Your software begs to differ. It's saying there is no "src" directory in your current working directory. Or if there is, then it doesn't have a "com" directory in it, and so on, but most likely your current working directory isn't right. You can find out these things using standard Linux commands.

And am I correct that your class is in the "com.example.web" package? If that's the case then it's the "src" directory which should be your current working directory.
Arun Giridharan
Ranch Hand

Joined: Sep 30, 2010
Posts: 290

ya, but still everything seems to be good , the package is correct one ,and folder from which compile for .class file seems to be okay!
Arun Giridharan
Ranch Hand

Joined: Sep 30, 2010
Posts: 290

JK~/Work-Space/Servlet/My Project/init-paramV1 $ locate -i TestParam.java
/home/jayakannan/Work-Space/Servlet/My Project/init-paramV1/src/com/example/web/ TestParam.java
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

Locating a file named "TestParam.java" isn't particularly relevant to an error message which says it can't find a file named "initParam.java".
Arun Giridharan
Ranch Hand

Joined: Sep 30, 2010
Posts: 290

i changed the initParam.java file name to TestParam.java
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Making that sort of change before you get everything else sorted out will only cause more confusion.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javac:File Not Found