Possible duplicate:How to find out the JDK version from Java code
In my java code, I want to check the jdk version. If it is equal to 1.5 or higher, and only I want to continue execution. How to get jdk version?
jdk
Use this condition.
Integer.parseInt(System.getProperty("java.version").split("\\.")[1]) >= 5
to check the version of Java.
String version = System.getProperty("java.version");
String version = System.getProperty("java.specification.version");
This will give you line 1.5 , for example. Easy to take apart.
1.5
Source: https://habr.com/ru/post/1436536/More articles:Design pattern for parameter parameters supported in a java project for a decent size - javaPHPExcel: How to delete a line to edit $ worksheet-> getHighestDataRow? - phpexcelGoogle Play Store Plans. Problems with apktool - androidHow to compare two two-digit integers, as, on the contrary, and one character at a time - pythonAudio playback and spectrum analysis libarary for C # - c #Android - how do you manage multiple layout files according to DRY principle? - androidmySQL SUM and COUNT, some values ββdouble when merged - sqlGet function type from scala console - scalaindexOf in Ruby - javascriptRuby. Why arr =% w {'a', 'b', 'c'} => ["'a',", "'b',", "'c'"] - arraysAll Articles