[izpack-users] Losing backslash in INSTALL_PATH variable

Atta Rehman arehman at bond.co.uk
Thu Feb 9 18:22:02 CET 2006


Hi Marc,

Many thanks for the quick response which has resolved the issue.

Cheers
Atta

-----Original Message-----
From: izpack-users-admin at berlios.de
[mailto:izpack-users-admin at berlios.de] On Behalf Of Marc Eppelmann
Sent: 09 February 2006 17:06
To: izpack-users at berlios.de
Subject: Re: [izpack-users] Losing backslash in INSTALL_PATH variable

Hi Atta,

try to use the parsable type: JavaProp for your Application Properties
file as follows:

<parsable targetfile="$INSTALL_PATH/my_app.properties" type="javaprop"/>

In your Properties you can also use forwar slashes ("/") i.e.
C:/OurApp/Scripts/mssql_db_tables.sql

Marc

Atta Rehman schrieb:
> 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.
>

_______________________________________________
izpack-users mailing list
izpack-users at lists.berlios.de
http://lists.berlios.de/mailman/listinfo/izpack-users



More information about the izpack-users mailing list