o only allow JDK 1.5 or above to execute Maven 3.x

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@726517 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2008-12-14 19:04:51 +00:00
parent 2aed210e8c
commit 3f3945729f
1 changed files with 5 additions and 12 deletions

View File

@ -84,18 +84,11 @@ public class MavenCli
return 1;
}
// TODO: maybe classworlds could handle this requirement...
if ( "1.4".compareTo( System.getProperty( "java.specification.version" ) ) > 0 )
if ( "1.5".compareTo( System.getProperty( "java.specification.version" ) ) > 0 )
{
System.err.println(
"Sorry, but JDK 1.4 or above is required to execute Maven. You appear to be using " + "Java:" );
System.err.println(
"java version \"" + System.getProperty( "java.version", "<unknown java version>" ) + "\"" );
System.err.println( System.getProperty( "java.runtime.name", "<unknown runtime name>" ) + " (build " +
System.getProperty( "java.runtime.version", "<unknown runtime version>" ) + ")" );
System.err.println( System.getProperty( "java.vm.name", "<unknown vm name>" ) + " (build " +
System.getProperty( "java.vm.version", "<unknown vm version>" ) + ", " +
System.getProperty( "java.vm.info", "<unknown vm info>" ) + ")" );
System.err.println();
System.err.println( "You need JDK 1.5 or above to execute Maven 3.x." );
System.err.println();
return 1;
}