문제

I have followed a tutorial on how to embed pig commands on java. I have installed cygwin and I did all the required setup. I have embedded the program in netbeans and called it idlocal1. The problem that I have is on cygwin. Basically when I typed (on cygwin) javac -cp pig.jar idlocal1.java in order to compile the program, I got the following message:

javac -cp pig.jar idlocal1.java
javac: file not found: idlocal1.java
Usage: javac <options> <source files>
use -help for a list of possible options

Can you please tell me where is the problem?

도움이 되었습니까?

해결책

Try to add the current directory to the classpath explicitly.

javac -cp pig.jar\;. idlocal1.java

If this does not work, next try to replace the semi-colon to a colon:

javac -cp pig.jar:. idlocal1.java

If even the above does not work, check whether idlocal1.java exists in the current directory. To be concrete, try to specify the file name with "./".

javac -cp pig.jar\;. ./idlocal1.java
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top