【问题标题】:"Where is the framework?" error in Play! framework“框架在哪里?”播放错误!框架
【发布时间】:2011-01-14 17:45:11
【问题描述】:

我刚开始使用 Play!框架并按照他们网站上的教程进行操作,但在尝试运行程序时在控制台中出现以下错误。

~
~ play! 1.1, http://www.playframework.org
~
~ Ctrl+C to stop
~ 
Listening for transport dt_socket at address: 8000
Exception in thread "main" play.exceptions.UnexpectedException: Where is the framework ?
    at play.Play.init(Play.java:193)
    at play.server.Server.main(Server.java:131)
Caused by: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:131)
    at java.util.jar.JarFile.<init>(JarFile.java:150)
    at java.util.jar.JarFile.<init>(JarFile.java:87)
    at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:90)
    at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:66)
    at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:71)
    at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
    at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:150)
    at java.net.URL.openStream(URL.java:1029)
    at play.Play.init(Play.java:178)
    ... 1 more

有人可以弄清楚问题是什么以及解决这个问题的解决方案吗?

【问题讨论】:

    标签: java linux ubuntu console playframework


    【解决方案1】:

    play.jar 文件似乎已损坏(查看根异常)。尝试重新下载,或运行“ant”。

    编辑:
    重命名您的游戏!目录为 Play。这 !符号在 jar URL 模式内部使用。

    【讨论】:

      【解决方案2】:

      我会说...它没有找到框架。

      你确定一切都安装好了?

      你有一些环境变量要设置吗?

      需要设置一些配置文件吗?

      干杯,

      【讨论】:

      • 我解压了下载的 zip 文件。使用 PATH=$PATH:$HOME/Play\!/play-1.1 将环境变量设置为目录 export PATH 还编辑了 .bashrc 文件以永久更改路径。
      • 所以重命名你的 Play!目录为 Play。这 !符号在 jar URL 模式内部使用。
      • @Guillaume:成功了。谢谢。 (您能否将此评论作为不同的答案发布,以便我可以选择它作为正确的答案。)
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-09-19
      • 1970-01-01
      • 1970-01-01
      • 2016-02-16
      • 2015-07-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多