Fix Java 7 detection - closes #861
This commit is contained in:
parent
36ea27454d
commit
5e5038c839
@ -27,6 +27,12 @@ public class Bootstrap
|
|||||||
*/
|
*/
|
||||||
public static void main(String[] args) throws Exception
|
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();
|
OptionParser parser = new OptionParser();
|
||||||
parser.allowsUnrecognizedOptions();
|
parser.allowsUnrecognizedOptions();
|
||||||
parser.acceptsAll( list( "v", "version" ) );
|
parser.acceptsAll( list( "v", "version" ) );
|
||||||
@ -39,13 +45,6 @@ public class Bootstrap
|
|||||||
return;
|
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 )
|
if ( BungeeCord.class.getPackage().getSpecificationVersion() != null && System.getProperty( "IReallyKnowWhatIAmDoingISwear" ) == null )
|
||||||
{
|
{
|
||||||
Calendar deadline = Calendar.getInstance();
|
Calendar deadline = Calendar.getInstance();
|
||||||
@ -60,8 +59,6 @@ public class Bootstrap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
System.setProperty( "java.net.preferIPv4Stack", "true" );
|
|
||||||
|
|
||||||
BungeeCord bungee = new BungeeCord();
|
BungeeCord bungee = new BungeeCord();
|
||||||
ProxyServer.setInstance( bungee );
|
ProxyServer.setInstance( bungee );
|
||||||
bungee.getLogger().info( "Enabled BungeeCord version " + bungee.getVersion() );
|
bungee.getLogger().info( "Enabled BungeeCord version " + bungee.getVersion() );
|
||||||
|
@ -17,9 +17,6 @@ public class Test
|
|||||||
|
|
||||||
public static void main(String[] args) throws Exception
|
public static void main(String[] args) throws Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
System.setProperty( "java.net.preferIPv4Stack", "true" );
|
|
||||||
|
|
||||||
BungeeCord bungee = new BungeeCord();
|
BungeeCord bungee = new BungeeCord();
|
||||||
ProxyServer.setInstance( bungee );
|
ProxyServer.setInstance( bungee );
|
||||||
bungee.getLogger().info( "Enabled BungeeCord version " + bungee.getVersion() );
|
bungee.getLogger().info( "Enabled BungeeCord version " + bungee.getVersion() );
|
||||||
|
Loading…
Reference in New Issue
Block a user