在我的Windows 10计算机上启动Play项目时出现问题(在Win 7上运行正常)
当我做"激活运行"我得到以下内容:
Error loading library, java.library.path=C:\Program Files\Java\jdk1.8.0_111\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Java\jdk1.8.0_111\bin;C:\Program Files\PostgreSQL\9.6\bin;C:\Program Files\Git\cmd;C:\dev\utils\activator-1.3.5-minimal;C:\Users\shuda\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Heroku\bin;.;C:\dev\projects\energywatch-portal-bk\target\native_libraries\64bits
Cannot load the JNotify native library (no jnotify_64bit in java.library.path)
Play will check file changes for each request, so expect degraded reloading performace.
--- (Running the application from SBT, auto-reloading is enabled) ---
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
[success] Compiled in 1s
我尝试了许多事情但没有成功。我尝试过改变:
addSbtPlugin(" com.typesafe.play"%" sbt-plugin"%" 2.2.2")
到
addSbtPlugin(" com.typesafe.play"%" sbt-plugin"%" 2.3.2")
我又得到了一个错误:
java.lang.NoClassDefFoundError: play/Project$
at com.typesafe.sbt.SbtEchoPlay$.tracePlaySettings(SbtEchoPlay.scala:19)
at com.typesafe.sbt.SbtEchoPlay$.echoPlaySettings$lzycompute(SbtEchoPlay.scala:16)
at com.typesafe.sbt.SbtEchoPlay$.echoPlaySettings(SbtEchoPlay.scala:16)
...
Caused by: java.lang.ClassNotFoundException: play.Project$
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.typesafe.sbt.SbtEchoPlay$.tracePlaySettings(SbtEchoPlay.scala:19)
at com.typesafe.sbt.SbtEchoPlay$.echoPlaySettings$lzycompute(SbtEchoPlay.scala:16)
at com.typesafe.sbt.SbtEchoPlay$.echoPlaySettings(SbtEchoPlay.scala:16)
...
所以,这是我目前的环境设置(更改sbt-plugin导致第二期)
scalaVersion:=" 2.10.3" - >来自build.sbt
addSbtPlugin(" com.typesafe.play"%" sbt-plugin"%" 2.2.2") - >来自plugins.sbt
sbt.version = 0.13.1 - >来自build.properties
再次,我在Win 10(64位)
在这里真的需要一些帮助,被困了几天。
答案 0 :(得分:5)
该消息表示Play无法找到jnotify lib,因此它将使用内部进程来检查文件更改(即在文件更改时重新编译并重新启动应用程序)。它不应该阻止你使用框架,但性能可能比使用jnotify更糟糕。
无论哪种方式,您都可以从https://sourceforge.net/projects/jnotify/下载JNotify并安装它(只需将jnotify_64bit.dll
复制到C:\Program Files\Java\jdk1.8.0_111\bin
),该消息就应该消失。