felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r529357 - /incubator/felix/trunk/main/src/main/java/org/apache/felix/main/Main.java
Date Mon, 16 Apr 2007 19:04:10 GMT
Author: rickhall
Date: Mon Apr 16 12:04:07 2007
New Revision: 529357

URL: http://svn.apache.org/viewvc?view=rev&rev=529357
Log:
Modified code for locating the system.properties file to match how
config.properties location was modified.

Modified:
    incubator/felix/trunk/main/src/main/java/org/apache/felix/main/Main.java

Modified: incubator/felix/trunk/main/src/main/java/org/apache/felix/main/Main.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/main/src/main/java/org/apache/felix/main/Main.java?view=diff&rev=529357&r1=529356&r2=529357
==============================================================================
--- incubator/felix/trunk/main/src/main/java/org/apache/felix/main/Main.java (original)
+++ incubator/felix/trunk/main/src/main/java/org/apache/felix/main/Main.java Mon Apr 16 12:04:07
2007
@@ -247,14 +247,15 @@
             String classpath = System.getProperty("java.class.path");
             int index = classpath.toLowerCase().indexOf("felix.jar");
             int start = classpath.lastIndexOf(File.pathSeparator, index) + 1;
-            if (index > start)
+            if (index >= start)
             {
+                // Get the path of the felix.jar file.
                 String jarLocation = classpath.substring(start, index);
-                if (jarLocation.length() == 0)
-                {
-                    jarLocation = ".";
-                }
-                confDir = new File(new File(jarLocation).getParent(), "conf");
+                // Calculate the conf directory based on the parent
+                // directory of the felix.jar directory.
+                confDir = new File(
+                    new File(new File(jarLocation).getAbsolutePath()).getParent(),
+                    "conf");
             }
             else
             {



Mime
View raw message