Re: Scripting engine - Java 6
- From: Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 31 Jul 2007 12:06:04 GMT
On Tue, 31 Jul 2007 11:19:00 -0000, debasish
<ghosh.debasish@xxxxxxxxx> wrote, quoted or indirectly quoted someone
who said :
Does this mean that if I want to stick to Sun's generifying layer,
I will be using classes like sun.org.mozilla.javascript.internal.NativeArray
for data type transformations between Javascript and Java ?
Or is there any other way of achieving the same goal.
Keep in mind, if you do that, you are cheating and defeating the
purpose of what Sun has done, so your code could break at any time.
Basically you get objects, find out their class with getClass, then
write code to cast them to specific objects so you can access the
native methods. You may find the methods you need in Sun's glue
objects are private to foil such attempts.
If I were you I would decide: do I want Sun generic scripting or
Rhino. Then, if Sun, stop cheating and use only the Sun API.. If
Rhino, bypass the Sun layer. Treat Rhino as if Sun had never heard of
it, downloading your own jar.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.
- Follow-Ups:
- Re: Scripting engine - Java 6
- From: debasish
- Re: Scripting engine - Java 6
- References:
- Scripting engine - Java 6
- From: debasish
- Re: Scripting engine - Java 6
- From: Roedy Green
- Re: Scripting engine - Java 6
- From: debasish
- Scripting engine - Java 6
- Prev by Date: Re: Detecting CPUs and cores
- Next by Date: Re: Need efficient search strategy in list of time intervals
- Previous by thread: Re: Scripting engine - Java 6
- Next by thread: Re: Scripting engine - Java 6
- Index(es):
Relevant Pages
|