import java.io.*;
import java.lang.*;

String versionError = "";
String versionVerified = "false";
try
{
    double reqVersion = 1.4;
    String version = System.getProperty("java.version");
    String versionString = version.substring(0, 3);
    double versionFloat = Double.parseDouble(versionString);
    if (versionFloat < reqVersion)
    {
        versionError = "Your Java version must be at least " + reqVersion + " to use all features of this skin.\n "
                         + " Your computer is running version " + version + ". \n"
                         + " The skin will still function, but some minor features will not work. \n"
                         + " You can go to http://www.java.com to download the latest Java version.";
        versionVerified = "false";
    }
    else
    {
        versionVerified = "true";
    }
    
    //popup message if user's Java version is outdated
    if (versionVerified.equals("false"))
    {
      JOptionPane.showMessageDialog(window, versionError);
    }
}
catch(Exception e)
{
    versionVerified = "false";
    versionError = "Your computer's Java version could not be determined.  \n"
                 + "The skin will still function, but some minor features will not work. \n";
}
album.put("versionVerified", versionVerified);
