...
>is there a way to check whether the Java version being used is AT
>LEAST version 6?
No. There are at least three.
>..My application has a nice UI feature that is only
>nice if Java 6 or higher is being used.
1) Web start - to handle versioning and possibly
prompt the user to upgrade if they have lower version.
<http://www.physci.org/jws/version.html>
2) try/catch. Try to perform the behaviour (what is it?)
and if the method does not exist, the app. will throw
a NoSuchMethodError or similar.
3) java.specification.version *
>...Lower versions result in the
>good old flickering behaviour. I know there is the "java.version"
>system property but how can I efficiently check this ... depending on
>the vendor it might have any kind of string in it, so I can't just
>convert it to a float, right?
* Right, but there are a variety of other java properties
that might give better float results, like the aforementioned
j.spec.version, see some of them through the app. here..
<http://www.physci.org/jws/#jtest>
(dump all the properties to the command line - you
might find something better still)
HTH

Signature
Andrew Thompson
http://www.athompson.info/andrew/
lemmi - 24 May 2007 14:09 GMT
Thanks Andrew, I guess I will go with option 3 and do a
Float.parseFloat() on the
returned value for system property "java.specification.version".
BTW, the feature is simply a small animation that changes the size of
a top level Swing window, so that it seems to slide into its parent
window. With Java 5 you get a lot of flickering, which makes this
feature useless. It is supposed to be eye candy, so it better look
good.
Dirk
> ..
>
[quoted text clipped - 35 lines]
>
> Message posted viahttp://www.javakb.com