Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #40584 +++ Inside the JDT/Core test suites, the libraries are retrieved using the org.eclipse.jdt.core.tests.util.Util class. In this class, we assume that rt.jar or classes.zip can be retrieved. The name of VMs are hard-coded. Customers experiment some trouble to run the test suites because java.lang.Object cannot be found. The method: /** * Search the user hard-drive for a Java class library. * Returns null if none could be found. * * Example of use: [org.eclipse.jdt.core.tests.util.Util.getJavaClassLib()] */ public static String getJavaClassLibs() { ... } should be improved. +++++++++++++++++++ Specifically, I am now seeing a problem with the IBM Java2 version 1.5 where they have moved java.lang.Object from core.jar to vm.jar. This is causing tests to fail because getJavaClassLibs does not know about vm.jar. For reference, here's the output of "java -version" java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build pxp32devifx-20060310 (SR1)) IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux ppc-32 j9vmxp3223ifx-20060310 (JIT enabled) J9VM - 20060220_05389_bHdSMR JIT - 20060220_2133_r8 GC - 20060214_AA) JCL - 20060222a I should note that the same problem occurs for x86 variant as well. In my workspace, I have modified getJavaClassLibs as follows: public static String[] getJavaClassLibs() { String jreDir = getJREDirectory(); final String osName = System.getProperty("os.name"); if (jreDir == null) { return new String[] {}; } if (osName.startsWith("Mac")) { return new String[] { toNativePath(jreDir + "/../Classes/classes.jar")}; } final String vmName = System.getProperty("java.vm.name"); if ("J9".equals(vmName)) { return new String[] { toNativePath(jreDir + "/lib/jclMax/classes.zip")}; } File file = new File(jreDir + "/lib/rt.jar"); if (file.exists()) { return new String[] { toNativePath(jreDir + "/lib/rt.jar") }; } file = new File(jreDir + "/lib/vm.jar"); if (file.exists()) { // The IBM J2SE 5.0 has put the java.lang classes in vm.jar. return new String[] { toNativePath(jreDir + "/lib/vm.jar"), toNativePath(jreDir + "/lib/core.jar"), toNativePath(jreDir + "/lib/security.jar"), toNativePath(jreDir + "/lib/graphics.jar") }; } return new String[] { toNativePath(jreDir + "/lib/core.jar"), toNativePath(jreDir + "/lib/security.jar"), toNativePath(jreDir + "/lib/graphics.jar") }; }
Corey - ok to wait until 3.2.1 ?
Yes, I think 3.2.1 is ok since this affects only people who run the test suite using the IBM JRE.
Thanks for the patch. Released for 3.3M1 in HEAD. Releasef for 3.2.1 in TARGET_321 branch.
Verified for 3.3 M1 using build I20060807-0010.
Released for 3.2.1
Verified for 3.2.1 using build M20060908-1655 (R3_2_maintenance source code indeed).