Your message dated Tue, 8 May 2012 18:46:25 +0200
with message-id <[email protected]>
and subject line Re: Bug#669078: openjdk-7-jre-lib: rhino.jar included but
impossible to use it as a ScriptEngine
has caused the Debian Bug report #669078,
regarding openjdk-7-jre-lib: rhino.jar included but impossible to use it as a
ScriptEngine
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
669078: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669078
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: openjdk-7-jre-lib
Version: 7~u3-2.1-3
Severity: normal
Dear Maintainer,
While developping a little program, I stumble in a problem with openjdk-7. I
reported the problem to Oracle, but it seems it’s a packaging problem.
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7158556)
Here is a copy of the report I made.
FULL PRODUCT VERSION :
java version "1.7.0_03-icedtea"
OpenJDK Runtime Environment (IcedTea7 2.1) (7~u3-2.1-3)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux xxx 3.2.0-2-amd64 #1 SMP Tue Mar 20 18:36:37 UTC 2012 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
It is not possible to use the Rhino javascript engine by using
ScriptEngineManager, even by manually adding the jar to the list of jar used or
using another jar with the Rhino engine.
It was working with java 6 but is not in java 7 (the expected output comes from
Java 6).
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Using the source code to output the engines.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Available language: ECMAScript
ACTUAL -
(nothing is outputted)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
public class Test {
public static void main(String[] args) {
ScriptEngineManager manager = new ScriptEngineManager();
for (ScriptEngineFactory factory :
manager.getEngineFactories()) {
System.out.println("Available language: "
+ factory.getLanguageName());
}
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No workaround found.
Posted Date : 2012-04-03 01:42:28.0
---- end of report copy ----
>From the answer provided in the bug, it seems to me that as rhino.jar is
>included in the package, that it should work. Apparently, the jar is missing
>the file META-INF/services/javax.script.ScriptEngineFactory with content:
#script engines supported
com.sun.script.javascript.RhinoScriptEngineFactory #javascript
(solution indicated by reading
http://stackoverflow.com/questions/10054252/trying-to-use-rhino-getenginebynamejavascript-returns-null-in-openjdk-7
)
I didn’t test it to verify if it would work.
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages openjdk-7-jre-lib depends on:
ii openjdk-7-jre-headless 7~u3-2.1-3
openjdk-7-jre-lib recommends no packages.
openjdk-7-jre-lib suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Version: 7~u3-2.1.1~pre1-2
Le mardi 17 avril 2012 04:53:00, Vincent Lhote a écrit :
> Dear Maintainer,
Hi Vincent,
[...]
> It is not possible to use the Rhino javascript engine by using
> ScriptEngineManager, even by manually adding the jar to the list of jar
> used or using another jar with the Rhino engine.
[...]
> ---------- BEGIN SOURCE ----------
> import javax.script.ScriptEngineFactory;
> import javax.script.ScriptEngineManager;
>
> public class Test {
>
> public static void main(String[] args) {
> ScriptEngineManager manager = new ScriptEngineManager();
> for (ScriptEngineFactory factory :
> manager.getEngineFactories()) {
> System.out.println("Available language: "
> + factory.getLanguageName());
> }
> }
>
> }
> ---------- END SOURCE ----------
[...]
This is fixed in icedtea 2.1.1 (build harness for openjdk) :
PR885: IcedTea7 does not build scripting support
I've checked that your code sample work with openjdk-7 7~u3-2.1.1~pre1-2 (now
in unstable). So I'm closing this issue, thanks for your feedback.
Cheers,
--
Damien
signature.asc
Description: This is a digitally signed message part.
--- End Message ---