Skip to content

Commit

Permalink
Showing 3 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions core/src/main/java/org/jruby/RubyInstanceConfig.java
Original file line number Diff line number Diff line change
@@ -1884,14 +1884,18 @@ public boolean shouldPrecompileAll() {
private static int initGlobalJavaVersion() {
final String specVersion = Options.BYTECODE_VERSION.load();
switch ( specVersion ) {
case "1.6" : return Opcodes.V1_6; // 50
case "1.7" : return Opcodes.V1_7; // 51
case "1.6" :
case "1.7" : throw new UnsupportedClassVersionError("JRuby requires Java 8 or higher");
case "1.8" : case "8" : return Opcodes.V1_8; // 52
// NOTE: JDK 9 now returns "9" instead of "1.9"

case "1.9" : case "9" : return Opcodes.V1_8 + 1; // 53
default :
System.err.println("unsupported Java version \"" + specVersion + "\", defaulting to 1.7");
return Opcodes.V1_7;
int version = Integer.parseInt(specVersion);
if (version >= 9) {
return Opcodes.V9;
} else {
throw new UnsupportedClassVersionError("JRuby requires Java 8 or higher");
}
}
}

2 changes: 1 addition & 1 deletion pom.rb
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@

'jruby-launcher.version' => '1.1.1',
'ant.version' => '1.9.2',
'asm.version' => '5.0.4',
'asm.version' => '6.0',
'jffi.version' => '1.2.16',
'joda.time.version' => '2.8.2' )

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ DO NOT MODIFIY - GENERATED CODE
<rake.version>10.4.2</rake.version>
<jruby-launcher.version>1.1.1</jruby-launcher.version>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<asm.version>5.0.4</asm.version>
<asm.version>6.0</asm.version>
<rspec-expectations.version>3.4.0</rspec-expectations.version>
<its.osgi>osgi*/pom.xml</its.osgi>
<base.javac.version>1.8</base.javac.version>

0 comments on commit 7b0fbf0

Please sign in to comment.