How can I include Rhino in the build

Charles Lee littlee at linux.vnet.ibm.com
Fri Jun 3 05:59:35 UTC 2011


On 06/03/2011 11:47 AM, Erik Trimble wrote:
> On 6/2/2011 6:12 PM, Charles Lee wrote:
>> On 06/02/2011 11:45 PM, Erik Trimble wrote:
>>> On 6/2/2011 3:18 AM, Charles Lee wrote:
>>>> Hi guys,
>>>>
>>>> I have checkout the mercurial forest from 
>>>> http://hg.openjdk.java.net/jdk7/jdk7/. But I can not have Rhino in 
>>>> the build. Do I miss any repository?
>>>>
>>>
>>> If you are referring to Mozilla's Rhino 
>>> (http://www.mozilla.org/rhino/), that is a completely separate piece 
>>> of software, and has no relation to the OpenJDK project.  It is not 
>>> hosted on the openjdk servers.  It is not needed to build OpenJDK.
>>>
>>> If you are interested in Rhino, you do NOT have to build the JDK 
>>> from scratch - you can use a pre-build OpenJDK binary.
>>>
>> Hi Erik,
>>
>> I am confused that the default javascript engine (Rhino) is included 
>> in the pre-build openjdk binary, but is not included in my local 
>> build. I was trying to do a find to search the classes[1], but 
>> classes are not in the repository. So I was wonder maybe I was 
>> missing some mercurial repos.
>>
>> Do you mean that openjdk default javascript engine is not the mozilla 
>> Rhino? (Sorry for the stupid question :-)
>>
>> I met this problem during I was trying to run the script demo in the 
>> demo/scripting/jconsole-plugin. The pre-build openjdk binary, 
>> downloaded from the website, run it well. But local build from 
>> mercurial repo threw a exception, said "Can not find javascript engine".
>>
>>
>> [1] classes are : 
>> sun.org.mozilla.javascript.internal.InterpretedFunction, 
>> sun.org.mozilla.javascript.internal.ScriptRuntime, etc
>
> Yes, those are NOT part of OpenJDK, those classes are part of the 
> ORACLE JDK. Not all portions of the Oracle JDK have been opened (for a 
> variety of reasons).
>
> The OpenJDK project includes a Javascript engine: javax.script. You 
> would have to download the Rhino package seperately, and build it if 
> you wanted that particular engine.  Take a look at the IcedTea project 
> (http://icedtea.classpath.org/wiki/FrequentlyAskedQuestions)  for more 
> information about how to use the OpenJDK project and other associated 
> project to create a work-alike for the Oracle JDK.
>
>
> The Demos stuff isn't maintained at all, and frankly shouldn't be part 
> of the JDK distribution.  In your case, it's using a private 
> Oracle-only implementation, which is completely wrong for portable 
> code, and why it breaks when being used with anything other than the 
> Oracle JDK.
>
>
>
>
>
Got it. Thanks Erik.

-- 
Yours Charles




More information about the build-dev mailing list