mxn21 / openjdk-osx-build

Automatically exported from code.google.com/p/openjdk-osx-build
0 stars 0 forks source link

OS X port javax.script.ScriptEngineManager is broken #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile and run the attached program

What is the expected output? What do you see instead?
We should get the class name of the Ruby engine. Instead there is the following 
exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no AppleScriptEngine 
in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1872)
        at java.lang.Runtime.loadLibrary0(Runtime.java:840)
        at java.lang.System.loadLibrary(System.java:1084)
        at apple.applescript.AppleScriptEngineFactory.<clinit>(AppleScriptEngineFactory.java:11)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at sun.misc.Service$LazyIterator.next(Service.java:288)
        at javax.script.ScriptEngineManager.initEngines(ScriptEngineManager.java:127)
        at javax.script.ScriptEngineManager.access$000(ScriptEngineManager.java:55)
        at javax.script.ScriptEngineManager$1.run(ScriptEngineManager.java:98)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.script.ScriptEngineManager.init(ScriptEngineManager.java:96)
        at javax.script.ScriptEngineManager.<init>(ScriptEngineManager.java:69)
        at Test.main(Test.java:6)

What version of the product are you using? On what operating system?
OS X port of Java 7 on Snow Leopard

Please provide any additional information below.
The AppleScriptEngine should either be included, or deleted from the engines 
the ScriptEngineManager tries to instantiate.

Original issue reported on code.google.com by mca...@tecnoguru.com on 19 Feb 2011 at 5:54

Attachments:

GoogleCodeExporter commented 8 years ago
I forgot to put in the whole command line (especially because of JAVA_HOME):

$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
$ javac Test.java
$ java -cp .:jruby-complete-1.5.5.jar Test

The same issue happens if I remove the classpath.

Original comment by mca...@tecnoguru.com on 19 Feb 2011 at 5:56

GoogleCodeExporter commented 8 years ago
Fixed in OpenJDK-OSX-1.7-universal-20110831.dmg

Original comment by henri.gomez on 30 Sep 2011 at 10:16