• 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:File Not Found

 
Ranch Hand
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 79152
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try another . after -d
 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
INValid Flag
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i changed the initParam.java file name to TestParam.java
 
Campbell Ritchie
Marshal
Posts: 79152
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Making that sort of change before you get everything else sorted out will only cause more confusion.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic