donaldp 01/12/01 19:48:59
Modified: src/java/org/apache/avalon/phoenix/launcher Main.java
Log:
Make sure that the canonical representation of file is used to designate
phoenix.home
Revision Changes Path
1.4 +9 -12
jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/launcher/Main.java
Index: Main.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/launcher/Main.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Main.java 2001/11/19 12:21:30 1.3
+++ Main.java 2001/12/02 03:48:59 1.4
@@ -69,22 +69,19 @@
throws Exception
{
String phoenixHome = System.getProperty( "phoenix.home", null );
- File loaderDir = null;
- if( null != phoenixHome )
+ if( null == phoenixHome )
{
- final String filename =
- phoenixHome + File.separator + "bin" + File.separator +
MAIN_JAR;
- return new File( filename );
- }
- else
- {
- loaderDir = findLoaderDir();
+ final File loaderDir = findLoaderDir();
phoenixHome = loaderDir.getAbsoluteFile().getParentFile() +
File.separator;
- System.setProperty( "phoenix.home", phoenixHome );
-
- return new File( loaderDir, MAIN_JAR );
}
+
+ phoenixHome = (new File( phoenixHome
)).getCanonicalFile().toString();
+ System.setProperty( "phoenix.home", phoenixHome );
+
+ final String filename =
+ phoenixHome + File.separator + "bin" + File.separator + MAIN_JAR;
+ return (new File( filename )).getCanonicalFile();
}
/**
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>