mirror of https://github.com/apache/activemq.git
Fix up classloader problems in Main class
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@421556 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f2d90cd97c
commit
2fc2c28516
|
@ -200,7 +200,7 @@ public class Main {
|
||||||
|
|
||||||
if(activeMQHome==null){
|
if(activeMQHome==null){
|
||||||
// guess from the location of the jar
|
// guess from the location of the jar
|
||||||
URL url = Main.class.getClassLoader().getResource("org/apache/activemq/broker/Main.class");
|
URL url = Main.class.getClassLoader().getResource("org/apache/activemq/console/Main.class");
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
try {
|
try {
|
||||||
JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
|
JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
|
||||||
|
@ -213,9 +213,10 @@ public class Main {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(activeMQHome==null){
|
if(activeMQHome==null){
|
||||||
activeMQHome = new File(".");
|
activeMQHome = new File("../.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return activeMQHome;
|
return activeMQHome;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue