我刚刚在Mac OSX Maverick上下载了Typesafe Activator 1.2.10-minimal。当我尝试使用任何命令运行它时,我收到以下错误:
java.lang.UnsatisfiedLinkError: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib/lwawt/liblwawt.dylib: dlopen(/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib/lwawt/liblwawt.dylib, 1): Library not loaded: @rpath/libosxapp.dylib
Referenced from: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib/lwawt/liblwawt.dylib
Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
at java.lang.Runtime.load0(Runtime.java:795)
at java.lang.System.load(System.java:1062)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1872)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1653)
at java.awt.Toolkit.<clinit>(Toolkit.java:1682)
at java.awt.Desktop.isDesktopSupported(Desktop.java:169)
at activator.ActivatorLauncher.openDocs(ActivatorLauncher.scala:55)
at activator.ActivatorLauncher.displayHelp(ActivatorLauncher.scala:72)
at activator.ActivatorLauncher.run(ActivatorLauncher.scala:32)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:19)
at xsbt.boot.Boot$.runImpl(Boot.scala:44)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.UnsatisfiedLinkError: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib/lwawt/liblwawt.dylib: dlopen(/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib/lwawt/liblwawt.dylib, 1): Library not loaded: @rpath/libosxapp.dylib
Referenced from: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib/lwawt/liblwawt.dylib
Reason: image not found
可能出现什么问题?
谢谢, Suriyanto
答案 0 :(得分:1)
将libosxapp.dylib从/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib复制到/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/ lib / lwawt为我解决了这个问题。好像@rpath只在lwawt文件夹中查找,而不是在lib文件夹中查找。在jdk8之后安装jdk7后发生了问题。
答案 1 :(得分:0)
这看起来不像Scala或Activator特定的问题,而是像JDK的问题。它正在run-path search paths上寻找libosxapp.dylib,但找不到它。
这很可能意味着您的JDK安装已损坏,或者您的环境设置存在问题(我只是在这里猜测,但我认为类似DYLD_LIBRARY_PATH可能会产生影响)。
/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib/libosxapp.dylib是否存在?如果没有,那就是问题所在。您可能希望重新安装JDK。
那个JDK上其他一切运行正常吗?
您是否尝试过其他JDK,例如Java 8(不是Activator需要Java 8,但这是在另一个JDK上尝试它的简单方法)。