Reputation: 324
I'm develop cross-platform standalone application for Win and Mac. Now I'm trying to check version of installed jre during runtime. Is it possible? What are your suggestions?
Upvotes: 0
Views: 81
Reputation: 13859
Use System.getProperty("java.version");
Or try to execute java -version.
Upvotes: 1
Reputation: 2881
The following
System.getProperty("java.version");
Will give you the version of the jre installed. For a full list of system properties: doc.
Upvotes: 3