Browse Source

Attempt to fix the Installers: Java Home is now set to the jdk directory itself and a separate jre directory doesn't exist anymore.

MeFisto94 5 years ago
parent
commit
8bc231ec0e

+ 1 - 2
nbi/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java

@@ -188,7 +188,7 @@ public class ConfigurationLogic extends ProductConfigurationLogic {
         }
         }
         //normen - JDK install - uses package on OSX
         //normen - JDK install - uses package on OSX
         if (!SystemUtils.isMacOS()) {
         if (!SystemUtils.isMacOS()) {
-            File javaHome = new File(System.getProperty("java.home")).getParentFile();
+            File javaHome = new File(System.getProperty("java.home"));
             File target = new File(installLocation, "jdk");
             File target = new File(installLocation, "jdk");
             try {
             try {
                 FileUtils.copyFile(javaHome, target, true); //FileUtils is one of the NBI core classes, already imported in ConfigurationLogic.java
                 FileUtils.copyFile(javaHome, target, true); //FileUtils is one of the NBI core classes, already imported in ConfigurationLogic.java
@@ -199,7 +199,6 @@ public class ConfigurationLogic extends ProductConfigurationLogic {
             // ADDED BY KIRILL: force correct permissions for JDK files
             // ADDED BY KIRILL: force correct permissions for JDK files
             LogManager.log("Setting JDK files as executable");
             LogManager.log("Setting JDK files as executable");
             setExecutableContents(target, "bin");
             setExecutableContents(target, "bin");
-            setExecutableContents(target, "jre/bin");
             setExecutableFile(target, "lib/jexec");
             setExecutableFile(target, "lib/jexec");
             setExecutableFile(target, "lib/amd64/libjawt.so");
             setExecutableFile(target, "lib/amd64/libjawt.so");
             setExecutableFile(target, "lib/amd64/jli/libjli.so");
             setExecutableFile(target, "lib/amd64/jli/libjli.so");