Pregunta

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?

¿Fue útil?

Solución

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top