added check for java vm version.

This commit is contained in:
hns 2001-08-08 09:36:25 +00:00
parent 94246ac283
commit b8082fa589

View file

@ -46,6 +46,17 @@ import com.sleepycat.db.*;
public static void main (String args[]) throws IOException { public static void main (String args[]) throws IOException {
// check if we are running on a Java 2 VM - otherwise exit with an error message
String jversion = System.getProperty ("java.version");
if (jversion == null || jversion.startsWith ("1.1") || jversion.startsWith ("1.0")) {
System.err.println ("This version of Helma requires Java 1.2 or greater.");
if (jversion == null) // don't think this will ever happen, but you never know
System.err.println ("Your Java Runtime did not provide a version number. Please update to a more recent version.");
else
System.err.println ("Your Java Runtime is version "+jversion+". Please update to a more recent version.");
System.exit (1);
}
String homeDir = null; String homeDir = null;
boolean usageError = false; boolean usageError = false;