Skip to content
Permalink
Browse files

[JENKINS-49737] - Issue(Print error to Java Version 9) (#14)

* Solving JENKINS-49737 Issue(Print error to Java Version 9)

* Revert "[maven-release-plugin] prepare for next development iteration"

This reverts commit 105703a.

* Delete org.eclipse.jdt.core.prefs

Deleting the eclipse files

* Delete org.eclipse.m2e.core.prefs

* Delete .classpath

* Delete .project

Deleting the Eclipse File

* Update pom.xml

Reverting to Orignal POM.xml from source repo

* Making Requested Changes

Changed comparison to exact java version and changed error message

* Removed Comment

Removed comment

* Fix the code to finally merge it

* Add space to expected Java version as @batmat suggested

* Remove extra spaces to trigger CI
  • Loading branch information...
AmitJMagar authored and oleg-nenashev committed Mar 10, 2018
1 parent b5160bf commit 9cf9059c509ce73112d40f50269cf39d626f70c6
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/Main.java
@@ -124,7 +124,7 @@ public static void main(String[] args) throws Exception {
String v = System.getProperty("java.class.version");
if (v!=null) {
try {
if (Float.parseFloat(v)<52.0f)
if (Float.parseFloat(v)!=52.0f)
throw new UnsupportedClassVersionError(v);
} catch (NumberFormatException e) {
// err on the safe side and keep on going
@@ -135,7 +135,7 @@ public static void main(String[] args) throws Exception {

_main(args);
} catch (UnsupportedClassVersionError e) {
System.err.println("Jenkins requires Java8 or later, but you are running "+
System.err.println("Jenkins requires Java 8, but you are running "+
System.getProperty("java.runtime.version")+" from "+System.getProperty("java.home"));
e.printStackTrace();
}

0 comments on commit 9cf9059

Please sign in to comment.
You can’t perform that action at this time.