Fix Java 7 detection - closes #861

This commit is contained in:
md_5 2014-02-08 09:40:08 +11:00
parent 36ea27454d
commit 5e5038c839
2 changed files with 6 additions and 12 deletions

View File

@ -27,6 +27,12 @@ public class Bootstrap
*/
public static void main(String[] args) throws Exception
{
if ( Float.parseFloat( System.getProperty( "java.class.version" ) ) < 51.0 )
{
System.err.println( "*** ERROR *** BungeeCord requires Java 7 or above to function!" );
return;
}
OptionParser parser = new OptionParser();
parser.allowsUnrecognizedOptions();
parser.acceptsAll( list( "v", "version" ) );
@ -39,13 +45,6 @@ public class Bootstrap
return;
}
if ( Float.parseFloat( System.getProperty( "java.class.version" ) ) < 51.0 )
{
System.err.println( "*** ERROR *** BungeeCord requires Java 7 or above to function!" );
return;
}
if ( BungeeCord.class.getPackage().getSpecificationVersion() != null && System.getProperty( "IReallyKnowWhatIAmDoingISwear" ) == null )
{
Calendar deadline = Calendar.getInstance();
@ -60,8 +59,6 @@ public class Bootstrap
}
}
System.setProperty( "java.net.preferIPv4Stack", "true" );
BungeeCord bungee = new BungeeCord();
ProxyServer.setInstance( bungee );
bungee.getLogger().info( "Enabled BungeeCord version " + bungee.getVersion() );

View File

@ -17,9 +17,6 @@ public class Test
public static void main(String[] args) throws Exception
{
System.setProperty( "java.net.preferIPv4Stack", "true" );
BungeeCord bungee = new BungeeCord();
ProxyServer.setInstance( bungee );
bungee.getLogger().info( "Enabled BungeeCord version " + bungee.getVersion() );