List of usage examples for org.apache.commons.lang3 JavaVersion JAVA_1_7
JavaVersion JAVA_1_7
To view the source code for org.apache.commons.lang3 JavaVersion JAVA_1_7.
Click Source Link
From source file:de.undercouch.citeproc.script.JREScriptRunnerTestSuite.java
/** * Sets the runner to use/*w ww . j a va 2s .co m*/ */ @BeforeClass public static void setUp() { if (!SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_7)) { //don't use the JRE runner with Java 1.6. It would fail anyway. prev = ScriptRunnerFactory.setRunnerType(RunnerType.AUTO); } else { prev = ScriptRunnerFactory.setRunnerType(RunnerType.JRE); } }
From source file:Book.java
public boolean isAtLeastJavaVersion() { return JavaVersion.JAVA_1_8.atLeast(JavaVersion.JAVA_1_7); }
From source file:de.undercouch.citeproc.script.ScriptRunnerFactory.java
/** * @return a {@link ScriptRunner} that uses the Rhino embedded into the JRE *///from w ww . j a va2 s .c o m private static ScriptRunner createJreRunner() { //Rhino is not available. Check if we have the right JRE version if (!SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_7)) { throw new RuntimeException("You're using a JRE 6 or lower and " + "Mozilla Rhino was not found in the classpath. The " + "bundled Rhino in JRE 6 does not support E4X " + "(ECMAScript for XML) which is needed for " + "citeproc-java. Either include Rhino in your " + "classpath or upgrade to a newer JRE."); } return new JREScriptRunner(); }
From source file:bear.core.BearMain.java
public static boolean hasFx() { return SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_7); }
From source file:de.undercouch.citeproc.script.ScriptRunnerBenchmark.java
/** * Tests the JRE script runner/*from w w w .j av a2 s . c o m*/ * @throws Exception if something goes wrong */ @BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 1) @Test public void jre() throws Exception { if (!SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_7)) { //skip test for Java 1.6. It would fail anyway return; } RunnerType prev = ScriptRunnerFactory.setRunnerType(RunnerType.JRE); try { runTest(); } finally { ScriptRunnerFactory.setRunnerType(prev); } }
From source file:org.lockss.app.TestLockssDaemon.java
public void testMinJavaVersion() throws Exception { assertEquals(JavaVersion.JAVA_1_7, LockssDaemon.MIN_JAVA_VERSION); }
From source file:tech.flatstone.appliedlogistics.AppliedLogistics.java
@Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { //Make sure we are running on java 7 or newer if (!SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_7)) { throw new OutdatedJavaException( String.format("%s requires Java 7 or newer, Please update your java", ModInfo.MOD_NAME)); }/*from ww w . ja v a2s.c o m*/ proxy.registerConfiguration(event.getSuggestedConfigurationFile()); PacketHandler.init(); // Register Blocks proxy.registerBlocks(); proxy.registerItems(); proxy.registerGUIs(); proxy.registerBlueprints(); proxy.registerFurnaceRecipes(); proxy.registerOreDict(); proxy.registerEvents(); proxy.registerRenderers(); proxy.registerWorldGen(); proxy.registerFluids(); IntegrationsManager.instance().index(); IntegrationsManager.instance().preInit(); }