[izpack-users] Execute Java Class

macke maier at isys.uni-klu.ac.at
Tue Nov 7 18:33:27 CET 2006


Hi!

First you have to specify in your install.xml, that you want to use the
ProcessPanel: 
<panels>
...
<panel classname="ProcessPanel"/>
...
</panels>

In the resources section of install.xml you have to tell where the xml for
it is:

    	<resources>
                .....
		<!-- what has the ProcessPanel to do -->
		<res id="ProcessPanel.Spec.xml" src="PATH/TO/ProcessPanel.Spec.xml"/>
    	</resources>

And you have to include your class. Easiest way is to generate a JAR file
including your class. In the install.xml you have then to add the line, e.g.
<jar src="PATH/TO/WriteProperties.jar"/>

In the ProcessPanel.Spec.xml you have to write:
<processing>
<job name="name of teh job">
<os family="windows" />
<executeclass name="com.izforge.izpack.util.WriteProperties"> <!-- this is
an example! as you see you have to write the package path to your class. If
you don't use packages, only write WriteProperties  -->
<arg>arg1</arg>
...
</executeclass>
</processing>

Hope this helps. 

regards,
Macke




Mandeep wrote:
> 
> I want to execute (during or after the installation process) java class
> which creates a properties file . I am trying to do this with ProcessPanel
> and writing the following ProcessPanel.Spec.xml for the same:
> <processing>
> <job name="any">
> 	<os family="windows"/>
> 	<executableclass name="$INSTALL_PATH/src/WriteProperties.class"/>	
> </job>
> </processing>
> is this the right way to do it...or should I so something else? Please
> suggest me.....I am new to IzPack.
> 

-- 
View this message in context: http://www.nabble.com/Execute-Java-Class-tf2589791.html#a7222992
Sent from the izpack users mailing list archive at Nabble.com.




More information about the izpack-users mailing list