activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r451583 - /incubator/activemq/branches/activemq-4.0/activemq-console/src/main/java/org/apache/activemq/console/Main.java
Date Sat, 30 Sep 2006 11:54:02 GMT
Author: aco
Date: Sat Sep 30 04:54:01 2006
New Revision: 451583

URL: http://svn.apache.org/viewvc?view=rev&rev=451583
Log:
Backported fix from 4.1 branch for: https://issues.apache.org/activemq/browse/AMQ-948

Modified:
    incubator/activemq/branches/activemq-4.0/activemq-console/src/main/java/org/apache/activemq/console/Main.java

Modified: incubator/activemq/branches/activemq-4.0/activemq-console/src/main/java/org/apache/activemq/console/Main.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.0/activemq-console/src/main/java/org/apache/activemq/console/Main.java?view=diff&rev=451583&r1=451582&r2=451583
==============================================================================
--- incubator/activemq/branches/activemq-4.0/activemq-console/src/main/java/org/apache/activemq/console/Main.java
(original)
+++ incubator/activemq/branches/activemq-4.0/activemq-console/src/main/java/org/apache/activemq/console/Main.java
Sat Sep 30 04:54:01 2006
@@ -201,22 +201,25 @@
 
             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();
                         url = jarConnection.getJarFileURL();
                         URI baseURI = new URI(url.toString()).resolve("..");
                         activeMQHome = new File(baseURI).getCanonicalFile();
+                        System.setProperty("activemq.home",activeMQHome.getAbsolutePath());
                     } catch (Exception ignored) {
                     }
                 }
             }
 
             if(activeMQHome==null){
-                activeMQHome = new File(".");
+                activeMQHome = new File("../.");
+                System.setProperty("activemq.home",activeMQHome.getAbsolutePath());
             }
         }
+        
         return activeMQHome;
     }
 }



Mime
View raw message