mirror of https://github.com/apache/openjpa.git
OPENJPA-2036: Check JAVA_HOME for lib/tools.jar for all java vendors, not just IBM.
Submitted By: Jason Pyeron git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1151885 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
868035a540
commit
4412599698
|
@ -191,16 +191,14 @@ public class InstrumentationFactory {
|
|||
if (log.isTraceEnabled() == true) {
|
||||
log.trace(_name + ".findToolsJar() -- couldn't find default " + toolsJarFile.getAbsolutePath());
|
||||
}
|
||||
if (JavaVendors.getCurrentVendor().isIBM()) {
|
||||
// If we're on an IBM SDK, then remove /jre off of java.home and try again.
|
||||
if (javaHomeFile.getAbsolutePath().endsWith(File.separator + "jre") == true) {
|
||||
javaHomeFile = javaHomeFile.getParentFile();
|
||||
toolsJarFile = new File(javaHomeFile, "lib" + File.separator + "tools.jar");
|
||||
if (toolsJarFile.exists() == false) {
|
||||
if (log.isTraceEnabled() == true) {
|
||||
log.trace(_name + ".findToolsJar() -- for IBM SDK couldn't find " +
|
||||
toolsJarFile.getAbsolutePath());
|
||||
}
|
||||
// If we're on an IBM SDK, then remove /jre off of java.home and try again.
|
||||
if (javaHomeFile.getAbsolutePath().endsWith(File.separator + "jre") == true) {
|
||||
javaHomeFile = javaHomeFile.getParentFile();
|
||||
toolsJarFile = new File(javaHomeFile, "lib" + File.separator + "tools.jar");
|
||||
if (toolsJarFile.exists() == false) {
|
||||
if (log.isTraceEnabled() == true) {
|
||||
log.trace(_name + ".findToolsJar() -- for IBM SDK couldn't find " +
|
||||
toolsJarFile.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
} else if (System.getProperty("os.name").toLowerCase().indexOf("mac") >= 0) {
|
||||
|
|
Loading…
Reference in New Issue