Skip to content

Commit

Permalink
Revert "Use tools.jar from java.home/lib directory (#140)" (#141)
Browse files Browse the repository at this point in the history
This reverts commit c859a78.
  • Loading branch information
llxia authored Nov 22, 2024
1 parent c859a78 commit 5b80d94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
6 changes: 3 additions & 3 deletions stf.build/include/top.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ limitations under the License.
<pathelement location="${first_prereqs_root}/log4j/log4j-core.jar"/>
</path>
<path id="tools.class.path">
<pathelement location="${java.home}/../lib/tools.jar"/>
<pathelement location="${first_prereqs_root}/tools/tools.jar"/>
</path>
<path id="asm.class.path">
<pathelement location="${first_prereqs_root}/asm/asm.jar"/>
Expand Down Expand Up @@ -332,9 +332,9 @@ limitations under the License.
-->

<target name="configure-tools-jar" depends="setup-java-properties" unless="${tools_jar_correct}">
<property name="tools_jar_origin" value="${java.home}/../lib/tools.jar"/>
<property name="tools_jar_origin" value="${java_bindir}/../lib/tools.jar"/>
<echo message="configure-tools-jar: Copying ${tools_jar_origin} to ${tools_jar_dir}"/>
<copy file="${tools_jar_origin}" todir="${tools_jar_dir}"/>
<copy file="${tools_jar_origin}" todir="${tools_jar_dir}"/>
<property name="tools_jar" value="${tools_jar_dir}/${tools_jar_file}"/>
<available file="${tools_jar_dir}/${tools_jar_file}" property="tools_jar_correct"/>
</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,6 @@ public StfEnvironmentCore(ArrayList<PropertyFileDetails> 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()));
} 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()) {
Expand Down

0 comments on commit 5b80d94

Please sign in to comment.