Read in the mascot.license file.
import java.util.Date;
import matrix_science.msparser.*;
public class config_license {
static {
try {
System.loadLibrary("msparserj");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. "
+ "Is msparserj.dll on the path?\n" + e);
System.exit(0);
}
}
public static void main(String argv[])
{
if(argv.length < 1) {
System.out.println("Location of 'mascot.license'-file has to be specified as a parameter");
System.exit(0);
}
ms_license file = new ms_license(argv[0]);
if (!file.isValid())
{
System.out.println("Error number: "+file.getLastError());
System.out.println("Error string: "+file.getLastErrorString());
System.exit(0);
}
if (file.isLicenseValid())
{
System.out.println("Mascot license is still valid. Other information:");
System.out.println(file.getLicenseString());
}
else
{
System.out.println("Mascot license has either expired or been corrupted");
}
}
}