播放框架,类型安全激活器:"加载JNotify监视服务时出错:java.library.path中没有jnotify"

时间:2018-02-21 01:31:00

标签: activator typesafe jnotify

我正在尝试通过typesafe activator 1.3打开现有的应用程序。 错误消息显示Java库中缺少JNotify,但我还将jnotify_64bit.dll文件添加到" /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin" ;目录。但我还是面临着这个错误。以下是日志。已经有一段时间我被困在这里,我真的需要一些帮助。

  

java.lang.UnsatisfiedLinkError:java.library.path中没有jnotify   java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)at   java.lang.Runtime.loadLibrary0(Runtime.java:870)at   java.lang.System.loadLibrary(System.java:1122)at   net.contentobjects.jnotify.macosx.JNotify_macosx。(未知   来源)at   net.contentobjects.jnotify.macosx.JNotifyAdapterMacOSX。(未知   来源)at   sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)     在   sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)     在   sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)     在java.lang.Class.newInstance(Class.java:442)at   net.contentobjects.jnotify.JNotify。(未知来源)at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:498)at   play.runsupport.JNotifyPlayWatchService $ JNotifyDelegate.ensureLoaded(PlayWatchService.scala:168)     在   play.runsupport.JNotifyPlayWatchService $$ anonfun $ 5.apply(PlayWatchService.scala:223)     在   play.runsupport.JNotifyPlayWatchService $$ anonfun $ 5.apply(PlayWatchService.scala:179)     在   scala.util.control.Exception $抓$$ anonfun $ withTry $ 1.适用(Exception.scala:129)     在   scala.util.control.Exception $抓$$ anonfun $ withTry $ 1.适用(Exception.scala:129)     在scala.util.control.Exception $ Catch.apply(Exception.scala:102)at   scala.util.control.Exception $ Catch.withTry(Exception.scala:129)at   play.runsupport.JNotifyPlayWatchService $。适用(PlayWatchService.scala:179)     在   play.runsupport.PlayWatchService $$不久$ 1.delegate $ lzycompute(PlayWatchService.scala:65)     在   play.runsupport.PlayWatchService $$匿名$ 1.delegate(PlayWatchService.scala:61)     在   play.runsupport.PlayWatchService $$匿名$ 1.watch(PlayWatchService.scala:74)     at play.runsupport.Reloader。(Reloader.scala:268)at   play.runsupport.Reloader $ .reloader $ lzycompute $ 1(Reloader.scala:174)     在   play.runsupport.Reloader $ .play $ runsupport $ Reloader $$ reloader $ 1(Reloader.scala:174)     at play.runsupport.Reloader $ .startDevMode(Reloader.scala:197)at at   play.forkrun.ForkRun $ .startServer(ForkRun.scala:82)at   play.forkrun.ForkRun.run(ForkRun.scala:173)at   play.forkrun.ForkRun $$ anonfun $ settingUp $ 1.applyOrElse(ForkRun.scala:162)     at akka.actor.Actor $ class.aroundReceive(Actor.scala:465)at   play.forkrun.ForkRun.aroundReceive(ForkRun.scala:148)at   akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)at at   akka.actor.ActorCell.invoke(ActorCell.scala:487)at   akka.dispatch.Mailbox.processMailbox(Mailbox.scala:254)at   akka.dispatch.Mailbox.run(Mailbox.scala:221)at   akka.dispatch.Mailbox.exec(Mailbox.scala:231)at   scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)     在   scala.concurrent.forkjoin.ForkJoinPool $ WorkQueue.runTask(ForkJoinPool.java:1339)     在   scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)     在   scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

1 个答案:

答案 0 :(得分:0)

我遇到了同样的错误。在我的例子中,我克隆了一个play框架(2.3.x)存储库项目来运行该项目。

我实际上是按照以下步骤操作的:

  1. sbt clean compile
  2. sbt evicted
  3. set ~run
  4. 现在,它运作良好!

    如果这不起作用,请尝试将java和javac更改为1.6版本。 实际上,直到Play 2.3使用Java 6。