← Back to team overview

openjdk team mailing list archive

[Bug 982501] Re: Rhino support (com.sun.script.javascript.*) removed between OpenJDK 6 and 7

 

Fixed in 7~u3-2.1.1~pre1-1ubuntu2

** Changed in: openjdk-7 (Ubuntu)
       Status: New => Fix Released

** Bug watch added: Debian Bug tracker #669078
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669078

** Also affects: openjdk via
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669078
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-7 in Ubuntu.
https://bugs.launchpad.net/bugs/982501

Title:
  Rhino support (com.sun.script.javascript.*) removed between OpenJDK 6
  and 7

Status in OpenJDK:
  Unknown
Status in “openjdk-7” package in Ubuntu:
  Fix Released

Bug description:
  The packages specifying Rhino support, `com.sun.script.javascript.*`,
  are missing from OpenJDK 7, though they were included in OpenJDK 6.
  This causes the `getEngineByName("JavaScript")` call on a
  `ScriptEngineManager` to return `null` (see my [StackOverflow question
  for this issue][1]).

  Specifically, this code should return `2` but throws a
  `NullPointerException`:

              ScriptEngineManager factory = new ScriptEngineManager();
              ScriptEngine engine = factory.getEngineByName("JavaScript");
              try {
                  System.out.println(engine.eval("1+1"));
              } catch (ScriptException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }

  This might very well be the cause of [openjdk-7 bug #920214][2].
  According to [Oracle bug #6876736][3], this is indeed a distro bug.

  Note that when Rhino was included in OpenJDK 6, it caused package
  conflicts ([openjdk-6 bug #255149][4], [Debian bug #512970][5]) .

  Based on question [#192941][6]

  OS: Ubuntu 11.10
  OpenJDK version: 7~b147-2.0-0ubuntu0.11.10.1

    [1]: http://stackoverflow.com/questions/10054252/trying-to-use-rhino-getenginebynamejavascript-returns-null-in-openjdk-7
    [2]: https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/920214
    [3]: http://bugs.sun.com/view_bug.do?bug_id=6876736
    [4]: https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/255149
    [5]: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512970
    [6]: https://answers.launchpad.net/ubuntu/+source/openjdk-7/+question/192941

To manage notifications about this bug go to:
https://bugs.launchpad.net/openjdk/+bug/982501/+subscriptions



References