Hi Norris,
As far as I understand it, the various VMBridge classes are supposed
to throw an exception if they don't work on a given JDK, so the code
in VMBridge.makeInstance that is looping through the possible classes
keeps trying others. For VMBridge_jdk15, this could be done by adding
code that tries accessing isVarArgs in a method at the time of
instantiation, e.g.:
public VMBridge_jdk15() throws SecurityException,
NoSuchMethodException {
// Just try and see if we can access isVarArgs() on this constructor
VMBridge_jdk15.class.getConstructor(new Class[] {}).isVarArgs();
}
I added this to my class, it now works again on JDK 1.4.
Jürg
On 6 Aug 2007, at 21:53, Norris Boyd wrote:
> I added VMBridge_jdk15 for Rhino 1.6R6, although I didn't write the
> previous VMBridge instances. From reading the previous code, I thought
> the intent was to allow people to edit the jar file to enable the code
> to work on different VM versions:
_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine