开发者

Running Play from cygwin - only play.bat is runnable?

开发者 https://www.devze.com 2023-04-05 02:00 出处:网络
I\'m trying to run Play from within cygwin, and when I run play dependencies, I get the following error:

I'm trying to run Play from within cygwin, and when I run play dependencies, I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: play/deps/DependenciesManager
Caused by: java.lang.ClassNotFoundException: play.deps.DependenciesManager...

play.bat dependencies succeeds, however. Even if I symlink /usr/local开发者_如何学编程/bin/play to .../play.bat,I get the same error.

What's going on here?


The content of play.bat suggest that it calls play with the appropriate location for the play script as first argument.

play.bat content (batch):

@echo off
"%~dp0python\python.exe" "%~dp0play" %*

Then the python script take the first argument (the/relative/path/to/play) and use it as its root folder to execute all the python script.

play content (python):

...
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'framework', 'pym'))
...

By invoking play directly your python script get executed in your current directory.

0

精彩评论

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

关注公众号