Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javac:File Not Found

 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 49466
64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try another . after -d
 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
INValid Flag
 
Paul Clapham
Sheriff
Posts: 21152
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21152
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i changed the initParam.java file name to TestParam.java
 
Campbell Ritchie
Sheriff
Pie
Posts: 49466
64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Making that sort of change before you get everything else sorted out will only cause more confusion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic