diff --git a/stf.build/include/top.xml b/stf.build/include/top.xml index f0f9f12..43ce102 100644 --- a/stf.build/include/top.xml +++ b/stf.build/include/top.xml @@ -132,7 +132,7 @@ limitations under the License. - + @@ -332,9 +332,9 @@ limitations under the License. --> - + - + diff --git a/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/FileRef.java b/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/FileRef.java index c15bb17..0785026 100644 --- a/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/FileRef.java +++ b/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/FileRef.java @@ -15,6 +15,7 @@ package net.adoptopenjdk.stf.environment; import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.regex.Pattern; diff --git a/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/StfEnvironmentCore.java b/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/StfEnvironmentCore.java index 5935ba9..3874b0a 100644 --- a/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/StfEnvironmentCore.java +++ b/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/StfEnvironmentCore.java @@ -94,6 +94,18 @@ public StfEnvironmentCore(ArrayList propertyFileDetails, Ar this.testRoots.add(defaultTestRoot); invocationProperties.put(Stf.ARG_TEST_ROOT.getName(), defaultTestRoot.getSpec()); } + + try { + String javaHome = System.getProperty("java.home"); + File javaLibDir = new File(javaHome, "../lib"); + if (javaLibDir.exists() && javaLibDir.isDirectory()) { + this.testRoots.add(new DirectoryRef(javaLibDir.getCanonicalPath())); // Add ../lib directory + } else { + System.out.println("Java lib directory does not exist: " + javaLibDir.getCanonicalPath()); + } + } catch (IOException e) { + throw new RuntimeException("Failed to add Java lib directory to test roots", e); + } // Work out where the prereqs are if (!getProperty(Stf.ARG_SYSTEMTEST_PREREQS).isEmpty()) {