[izpack-users] Updating db with INSTALL_PATH value

Miraodb miraodb at hotmail.com
Mon Jan 9 13:53:26 CET 2006


Hi yossi,

Sorry i didn't catch your problem at the begining.
To do such thing is pretty simple with the processpanel.
You put the variable as an argument passed to the class into the script or
batch file. Thus it's first translated by IzPack processor and then it's
passed translated to the class.

java -classpath
$INSTALL_PATH\updates\msutil.jar;$INSTALL_PATH\updates\msbase.jar;$INSTALL_P
ATH\updates\mssqlserver.jar;$INSTALL_PATH\updates\ojdbc14.jar;$INSTALL_PATH\
updates\
JDBCGeneral
$INSTALL_PATH\updates\
$ServerNameTextInput
$PortNbTextInput
$DBNameTextInput
$UserNameTextInput
$UserPwdTextInput
$SQLServerTypeThis is what i have in my bat file. You can see that i can use
all kind of variables defined either in a userinputpanel or custom or even
builtin ones such as $INSTALL_PATH.Hope this helps this
time.Cheers,fabrice----- Original Message ----- 
From: "Yossi Baram" <yossiba at eldat.com>
To: <izpack-users at lists.berlios.de>
Sent: Monday, January 09, 2006 1:01 PM
Subject: [izpack-users] Updating db with INSTALL_PATH value


Thanks man,
In my xml I use scripts that containe all my querys(sql files) and it
works fine,
 <sql driver="com.mysql.jdbc.Driver"
                        url="jdbc:mysql://localhost:3306/advantag_Ndb"
                        userid="root"
                        password=""
                        autocommit="false">
                        <classpath>
                                <pathelement
location="${BASE_SYSTEM}\Mysql\mysql-connector-java-3.1.10-bin.jar"></pa
thelement>
                        </classpath>
                        <!-- Executing scripts -->
                        <transaction
src="${BASE_SYSTEM}\DBScripts\01-CreateEmptyDB.sql"/>
                        <transaction
src="${BASE_SYSTEM}\DBScripts\02-InsertPrimeData.sql"/>
                        <transaction
src="${BASE_SYSTEM}\DBScripts\04-InsertCaptionsData.sql"/>
                </sql>

My only problem is to send $INSTALL_PATH value to those files.
How do I send this variable via your solution, if I understand you right
you use bat file that implement the query, if so, how can outside
variables can be retrieved ?
Hope I'm understood.
Thanks

Yossi





More information about the izpack-users mailing list