Reputation: 9
I am using windows 8. I have set environment as path having value C:\Program Files\Java\jdk1.8.0\bin. But still i am getting error while compiling java file as
javac: file Not found: fileName.java
Usage: javac <options> <source files>
Upvotes: 0
Views: 888
Reputation: 21778
You need to specify files to compile (space delimited if multiple). If just by name, they must be in the current folder. The path concept will not work here, all files that must be compiled should be directly specified in the input. Normally javac
compiler alone is only used if you only need to compile one or two files as proof of concept.
Use more advanced command line tool like ant (works under Windows) for the real world size projects.
Upvotes: 3
Reputation: 880
MyComputer >> System Properties >>Advanced System Settings >> Environment Variables under that add
PATH - c:/blah/java/jdk1.6/bin; //add your bin you have shown above and CLASSPATH - .; // dont miss tht semicolons at the end .
thats all i did . in Win 8
Upvotes: 0