title: Java check latest version programmatically
body: <p><strong>Goal</strong>: check java's version on a machine (I can get this from <code>java -version</code>). Compare it with latest available from <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" rel="nofollow noreferrer">java website</a></p>
  
  <p>I would like to know if there is any way I can check for latest Java releases assuming that I have JRE/JDK installed on a machine. </p>
  
  <p>If I can do this through Java itself, my solution would become platform independent. I could use <code>java.net.URL</code> class to send a request to Java website and get the HTML, however the response would be dynamic as Oracle can change their website and styles and possibly will have maintenance issues in long run.</p>
  
  <p>I have looked at <a href="http://www.javatester.org/about.html" rel="nofollow noreferrer">javatester.org</a>, but I would not want it through an applet but through command line (which I can add to a script).</p>
  
  <p>Through javacpl.exe, I can schedule periodic checks, but I would like to do it on demand.</p>