Java check latest version programmatically

前端 未结 9 1671
不思量自难忘°
不思量自难忘° 2020-12-14 02:36

Goal: check java\'s version on a machine (I can get this from java -version). Compare it with latest available from java website

I woul

9条回答
  •  盖世英雄少女心
    2020-12-14 03:15

    An URL very similar to the now defunct "JreCurrentVersion2.txt":

    http://javadl-esd-secure.oracle.com/update/baseline.version

    The contents of the link look like this:

    1.8.0_111
    1.7.0_121
    1.6.0_131
    1.5.0_99
    1.4.2_43
    

    You can easily parse the contents to find the latest JRE versions.

提交回复
热议问题