Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javac no source files found

Tags:

java

I have the .java file on the current working directory but javac reports:

javac: no source files
Usage: javac <options> <source files>
use -help for a list of possible options

I'm working on ubuntu.

like image 216
user602774 Avatar asked Feb 16 '11 03:02

user602774


1 Answers

From your comment above, it looks like you tried:

javac -cp .;lib.jar a.java on your Ubuntu system. The CLASSPATH separator is : on Unix systems and ; on Windows.

Ubuntu considered the command up to the ;, java -cp . and thus gave the message.

javac -cp .:lib.jar a.java should compile fine.

like image 132
Raghuram Avatar answered Oct 01 '22 00:10

Raghuram