Getting Java version of java inat runtime
I need to write version-independent java code, because of some bugswork around a Java bug in JDK 1.5 which was fixed in JDK 1.6 now i use. I'm using the following condition:
if (System.getProperty("java.version").startsWith("1.5.")) {
...
} else{
...
}
Will this work for other JVMs? Is there another possibilitya better way to check this? Will it work for JVM from IBM?
Getting version of java in runtime
I need to write version-independent java code, because of some bugs in JDK 1.5 which was fixed in JDK 1.6 now i use the following condition:
if (System.getProperty("java.version").startsWith("1.5.")) {
...
} else{
...
}
Is there another possibility to check this? Will it work for JVM from IBM?
Getting Java version at runtime
I need to work around a Java bug in JDK 1.5 which was fixed in 1.6. I'm using the following condition:
if (System.getProperty("java.version").startsWith("1.5.")) {
...
} else{
...
}
Will this work for other JVMs? Is there a better way to check this?
Getting version of java in runtime
I need to write version-independent java code, because of some bugs in JDK 1.5 which was fixed in JDK 1.6 now i use the following condition:
if (System.getProperty("java.version").startsWith("1.5.")) {
...
} else{
...
}
Is there another possibility to check this? Will it work for JVM from IBM?