Skip to content
This repository has been archived by the owner on Sep 8, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 9cf9059
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/Main.java
Expand Up @@ -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
Expand All @@ -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();
}
Expand Down

0 comments on commit 9cf9059

Please sign in to comment.