我有一个在eclipse中开发的groovy项目,里面有一个包(hello)和一个groovy类(helloWorld.groovy).我已经导出了jar(Say HelloWorld.jar).我试图通过以下方式在unix中执行此jar: -
groovy -cp /tmp/HelloWorld.jar hello.helloWorld
Run Code Online (Sandbox Code Playgroud)
但得到以下错误: -
Caught: java.io.FileNotFoundException: /tmp/hello.helloWorld (/tmp/hello.helloWorld)
java.io.FileNotFoundException: /tmp/hello.helloWorld (/tmp/hello.helloWorld)
Run Code Online (Sandbox Code Playgroud)