0

Assuming that all jre releases, when released, consider apps made for use with previous jre versions(by this I mean, if I made a n app that ran on the jre6 platform min, and oracle then released jre7, oracle would make oldapps compatible on their new platform), how could I detect user jre version, even for future jre releases?

Although clearly not the correct code, I would use something like this, as to avoid creating a separate method for each jre version previous to jre6. However, its also clear that for anyone who has updated to jre7 who tries to run my program, they will be redirected to backdate to jre6 - in order to run my program.

String platform = whatgoeshere.getjreversion();

if (platform != jre6){
    ....get update from website
}
user4163554
  • 51
  • 10

1 Answers1

0

Jre versions come like 1.1.5, 1.1.6 etc, by using these numbers in the style u want, you could take the version nmber, knock off the first two characters...in this case, the '1.', leaving 1.5, or 1.6 as the fetched version number. From there you can save this value as a double, say version, and use the following...

if (version >= 1.5){ ...do something..}
dazbrad
  • 182
  • 1
  • 12