« Return to Thread: VMBridge_jdk15 is used for JDK 1.4?

Re: VMBridge_jdk15 is used for JDK 1.4?

by Attila Szegedi :: Rate this Message:

Reply to Author | View in Thread

Instead of testing for java.version, I tend to use some more foolproof  
approaches, like in this case I'd probably use this:

try {
     java.lang.reflect.Method.class.getMethod("isVarArgs", (Class[])null);
     // if we get here, we're on at least 1.5 JRE
}
catch(NoSuchMethodException e) {
     // if we get here, we're on a pre-1.5 JRE
}

I think we definitely need to put out a bugfix release -- not being able  
to use Rhino on JDK 1.4 out of the box, needing people to manually remove  
a file from the JAR file is a major issue.

Attila.

On Tue, 07 Aug 2007 03:53:38 +0200, Norris Boyd <norrisboyd@...>  
wrote:

>
> It would be nicer to detect the current version of the JVM using
> System.getProperty("java.version") and load the appropriate VMBridge
> instance. Too bad 1.6R6 is already out, but we can make that change
> for 1.7 or 1.6R6.1 if we need it.
>
> --N
>
> _______________________________________________
> dev-tech-js-engine mailing list
> dev-tech-js-engine@...
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine

 « Return to Thread: VMBridge_jdk15 is used for JDK 1.4?