Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Javac:File Not Found

 
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.
 
Marshal
Posts: 70286
282
  • 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
 
Marshal
Posts: 25818
69
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
Marshal
Posts: 25818
69
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
Marshal
Posts: 70286
282
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic