Running Play from cygwin - only play.bat is runnable?
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.
精彩评论