diff --git a/src/main/java/io/openliberty/tools/common/plugins/util/InstallFeatureUtil.java b/src/main/java/io/openliberty/tools/common/plugins/util/InstallFeatureUtil.java index d06597c1..49276e26 100644 --- a/src/main/java/io/openliberty/tools/common/plugins/util/InstallFeatureUtil.java +++ b/src/main/java/io/openliberty/tools/common/plugins/util/InstallFeatureUtil.java @@ -1151,7 +1151,14 @@ public static String productInfo(File installDirectory, String action) throws Pl } else { productInfoFile = installDirectory + "/bin/productInfo"; } + ProcessBuilder pb = new ProcessBuilder(productInfoFile, action); + Properties sysp = System.getProperties(); + String javaHome = sysp.getProperty("java.home"); + if (javaHome != null) { + pb.environment().put("JAVA_HOME", javaHome); + } + pb.redirectErrorStream(true); pr = pb.start(); in = new BufferedReader(new InputStreamReader(pr.getInputStream()));