Getting version of java in runtime
- by list
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?