diff --git a/camel/src/main/java/com/github/theprez/manzan/ManzanMainApp.java b/camel/src/main/java/com/github/theprez/manzan/ManzanMainApp.java index e0ac744..a5585ff 100644 --- a/camel/src/main/java/com/github/theprez/manzan/ManzanMainApp.java +++ b/camel/src/main/java/com/github/theprez/manzan/ManzanMainApp.java @@ -32,6 +32,18 @@ public static void main(final String... _args) throws Exception { return; } + // Check to make sure we use right java version on IBM i + if (Config.isIBMi()){ + // Get the Java vendor property + String javaVendor = System.getProperty("java.vendor"); + // Check if the vendor is IBM + if (!javaVendor.toLowerCase().contains("ibm")) { + System.out.println("Java vendor: " + javaVendor); + System.err.println("Error: This application requires Java provided by IBM"); + System.exit(1); + } + } + for(final String arg:_args) { if(arg.startsWith("--configdir=")) { System.setProperty(Config.DIRECTORY_OVERRIDE_PROPERTY, arg.replaceFirst("^[^=]+=", "")); diff --git a/docs/install.md b/docs/install.md index f2cad8d..9989ce0 100644 --- a/docs/install.md +++ b/docs/install.md @@ -4,7 +4,7 @@ Building Manzan is easy for IBM i and we provide makefiles to simplify the entir ## Which Java to use Use a Java version provided by IBM, which is at least version 8. When running the `java -version` command, the output -should contain the string `IBM Semeru Runtime Certified Edition`. Otherwise, Manzan may not function properly. +should contain the string `IBM`. Ex. `IBM Semeru Runtime Certified Edition`. Otherwise, Manzan may not function properly. ## Install from GitHub release