test/tools/launcher/TestHelper.java
Print this page
*** 90,100 ****
System.getProperty("sun.arch.data.model").equals("32");
static final boolean isSolaris =
System.getProperty("os.name", "unknown").startsWith("SunOS");
static final boolean isLinux =
System.getProperty("os.name", "unknown").startsWith("Linux");
! static final String JVM_DLL = isWindows ? "jvm.dll" : "libjvm.so";
static final boolean isSparc = System.getProperty("os.arch").startsWith("sparc");
// make a note of the golden default locale
static final Locale DefaultLocale = Locale.getDefault();
--- 90,102 ----
System.getProperty("sun.arch.data.model").equals("32");
static final boolean isSolaris =
System.getProperty("os.name", "unknown").startsWith("SunOS");
static final boolean isLinux =
System.getProperty("os.name", "unknown").startsWith("Linux");
! static final String LIBJVM = isWindows
! ? "jvm.dll"
! : "libjvm" + (isMacOSX ? ".dylib" : ".so");
static final boolean isSparc = System.getProperty("os.arch").startsWith("sparc");
// make a note of the golden default locale
static final Locale DefaultLocale = Locale.getDefault();
*** 132,150 ****
File binDir = (isSDK)
? new File((new File(JAVAHOME)).getParentFile(), "bin")
: new File(JAVAHOME, "bin");
JAVA_BIN = binDir.getAbsolutePath();
! JAVA_JRE_BIN = new File((new File(JAVAHOME)).getParentFile(),
! (isSDK) ? "jre/bin" : "bin").getAbsolutePath();
File libDir = (isSDK)
? new File((new File(JAVAHOME)).getParentFile(), "lib")
: new File(JAVAHOME, "lib");
JAVA_LIB = libDir.getAbsolutePath();
! JAVA_JRE_LIB = new File((new File(JAVAHOME)).getParentFile(),
! (isSDK) ? "jre/lib" : "lib").getAbsolutePath();
File javaCmdFile = (isWindows)
? new File(binDir, "java.exe")
: new File(binDir, "java");
javaCmd = javaCmdFile.getAbsolutePath();
--- 134,150 ----
File binDir = (isSDK)
? new File((new File(JAVAHOME)).getParentFile(), "bin")
: new File(JAVAHOME, "bin");
JAVA_BIN = binDir.getAbsolutePath();
! JAVA_JRE_BIN = new File(JAVAHOME, "bin").getAbsolutePath();
File libDir = (isSDK)
? new File((new File(JAVAHOME)).getParentFile(), "lib")
: new File(JAVAHOME, "lib");
JAVA_LIB = libDir.getAbsolutePath();
! JAVA_JRE_LIB = new File(JAVAHOME, "lib").getAbsolutePath();
File javaCmdFile = (isWindows)
? new File(binDir, "java.exe")
: new File(binDir, "java");
javaCmd = javaCmdFile.getAbsolutePath();
*** 187,202 ****
haveServerVM = haveVmVariant("server");
}
private static boolean haveVmVariant(String type) {
if (isWindows) {
File vmDir = new File(JAVA_JRE_BIN, type);
! File jvmFile = new File(vmDir, JVM_DLL);
return jvmFile.exists();
} else {
File vmDir = new File(JAVA_JRE_LIB, type);
File vmArchDir = new File(vmDir, getJreArch());
! File jvmFile = new File(vmArchDir, JVM_DLL);
return jvmFile.exists();
}
}
void run(String[] args) throws Exception {
int passed = 0, failed = 0;
--- 187,202 ----
haveServerVM = haveVmVariant("server");
}
private static boolean haveVmVariant(String type) {
if (isWindows) {
File vmDir = new File(JAVA_JRE_BIN, type);
! File jvmFile = new File(vmDir, LIBJVM);
return jvmFile.exists();
} else {
File vmDir = new File(JAVA_JRE_LIB, type);
File vmArchDir = new File(vmDir, getJreArch());
! File jvmFile = new File(vmArchDir, LIBJVM);
return jvmFile.exists();
}
}
void run(String[] args) throws Exception {
int passed = 0, failed = 0;