suriyanto
suriyanto

Reputation: 1095

Running Typesafe Activator 1.2.10 on OSX Maverick error

I have just downloaded Typesafe Activator 1.2.10-minimal on Mac OSX Maverick. When I try to run it using any command, I get the following error:

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

What could be wrong?

Thanks, Suriyanto

Upvotes: 0

Views: 474

Answers (2)

Jerry
Jerry

Reputation: 109

Copying libosxapp.dylib from /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib to /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib/lwawt solved the issue for me. Seems like @rpath looks in only lwawt folder, not in lib folder. Issue had happened to me after installing jdk7 after jdk8.

Upvotes: 1

lutzh
lutzh

Reputation: 4965

This does not look like a Scala- or Activator-specific problem, but rather like a problem with your JDK. It is looking for libosxapp.dylib on the run-path search paths, but doesn't find it.

That most likely means that either your JDK installation is broken, or there is some problem with your environment settings (I'm just guessing here, but I think something like DYLD_LIBRARY_PATH might have an impact).

Does /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre/lib/libosxapp.dylib exist? If not, that's the problem. You might want to reinstall your JDK then.

Does everything else run fine on that JDK?

Have you tried it with another JDK, e.g. Java 8 (not that Activator would require Java 8, but that would be an easy way to try it on another JDK).

Upvotes: 0

Related Questions