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:
Adrian T. Co 2006-07-13 09:29:10 +00:00
parent f2d90cd97c
commit 2fc2c28516
1 changed files with 3 additions and 2 deletions

View File

@ -200,7 +200,7 @@ public class Main {
if(activeMQHome==null){
// 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) {
try {
JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
@ -213,9 +213,10 @@ public class Main {
}
if(activeMQHome==null){
activeMQHome = new File(".");
activeMQHome = new File("../.");
}
}
return activeMQHome;
}
}