[izpack-users] Losing backslash in INSTALL_PATH variable

Atta Rehman arehman at bond.co.uk
Thu Feb 9 17:37:35 CET 2006


Hi
 
We are having some problems with the built-in $INSTALL_PATH variable
when used in our applications .properties files.  For example our IzPack
installer prompts user to chose the install folder which then gets used
in our applications .properties files as follows.
 
DB.SCRIPT.FILE.PATH=$INSTALL_PATH\\Scripts\\mssql_db_tables.sql
 
Parsing done by IzPack is OK and we end up with the following (installer
run on windows choosing C:\OurApp as install folder):
 
DB.SCRIPT.FILE.PATH=C:\OurApp\\Scripts\\mssql_db_tables.sql   <= NOTE
just one \ after the C:
 
The problem arises when the following code is run to read in the path
set by the DB.SCRIPT.FILE.PATH property.
 
private void createDBTables()
   {
      try
      {
        ResourceBundle  rb = getBundle();
        String fileName = rb.getString("DB.SCRIPT.FILE.PATH");
 
We end up with the following in the 'fileName'
 
'C:OurApp\\Scripts\\mssql_db_tables.sql'   <= NOTE missing \ after the
C:
 
I know it is because the backslash is used for the escape sequence in
Java and hence the only backslash in our $INSTALL_PATH getting removed
which is causing problems.
 
I'm new to IzPack and to Java so any help with the above would be much
appreciated.
 
Regards,
Atta

This message, together with any attachments, is
confidential and is intended only for the use of
the addressee(s) and may contain information
which is covered by legal, professional or other
privilege. If you are not the intended recipient
please destroy this E-mail and inform us.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-users/attachments/20060209/5b5d560f/attachment.html 


More information about the izpack-users mailing list