开发者

specifing path to class file from java command line?

I'm running a local script to automatically compile some .java files and deploy the .class files to a remote server.

On the remote server I can then issue this command from the directory I uploaded 开发者_StackOverflow社区it too (i.e., /tmp) and it works fine....

java -cp .:/usr/share/java/mysql-connector-java.jar gpimport

But to execute it from my local script I need to specify the path of the .class file in /tmp so java knows where to look for it.

How do I do that? I thought it would've been really simple to figure out but I haven't had any luck so far!


Just change the first classpath . to /tmp:

java -cp /tmp:/usr/share/java/mysql-connector-java.jar gpimport
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜