Note that there are some explanatory texts on larger screens.

plurals
  1. POEmbedding a jre into WInrun4j only once for installer and application
    primarykey
    data
    text
    <p>For installation of my Windows desktop application I create an installer using izpack and then call it from an exe using winrun4j, also part of the izpack installation add another winrun4j wrapper for actually running the application once installed.</p> <p>The trouble is that for the win4runj.exe to work it needs to be using the correct Java type, i.e if exe is 64bit it must run 64 bit jvm, if exe is 32 bit it must run 32bit jvm. This can be confusing for the user so I was going to take advantage of winrun4j to use an embedded jvm and then make two downloads available</p> <ul> <li>widgetinstaller.exe (32-bit) </li> <li>widgetinstaller64.exe (64-bit)</li> </ul> <p>But my confusion is that for each download I only want to embed the jvm once but cannot work out how to do this because i have two exes (the installer, and the program itself) , can this be done ? </p> <p><strong>Update</strong></p> <p>Have it working if I install JVM twice (once included in install.jar when built with izpack, and once added to the zip file so can be used by widgetinstaller.exe). </p> <ul> <li>widgetinstaller.exe resides in c:\code\widget\installer</li> <li>Download 32bit jre from Oracle</li> <li>Install into c:\code\widget\32bitJVM</li> <li>Edit izpack.xml, adding <code>&lt;file src="C:/code/widget/JVM32bit" targetdir="$INSTALL_PATH"/&gt;</code></li> <li>Add for installer vm.location=32bitJVM/bin/client/JVM.dll to c:\code\widget\installer\widgetinstaller.ini</li> <li>Add for widget itself vm.location=../32bitJVM/bin/client/JVM.dll to c:\code\widget\widget.ini </li> <li>Rebuild code, and zip up including 32bitJVM in the zip file to create widgetinstaller.zip (this contains 32bitJVM, widgetinstaller.ini,widgetinstaller.exe, widgetinstaller.ico and install.jar)</li> <li>Unzip and double-click on widgetinstaller.exe to install</li> </ul> <p>But I only want JVM once, I know I need to remove the <code>&lt;file src="C:/code/widget/JVM32bit" targetdir="$INSTALL_PATH"/&gt;</code> from izpack.xml, but then how do I copy my 32bitJVM into program installation folder </p> <p><strong>that same JVM needs to be saved to the program folder.</strong></p> <p>Seems this has to be done outside of izpack itself ?</p> <p><strong>EDIT</strong></p> <p>Solution is to use Izpack loose packs described at at <a href="https://stackoverflow.com/questions/12516240/can-i-install-a-file-using-izpack-5-without-it-being-part-of-the-install-jar-bui">Can I install a file using Izpack 5 without it being part of the install.jar built by izpack</a></p> <p>but it is quite confusing what must be set for the path, documentation incorrectly implies you put in a relative link <a href="http://izpack.org/documentation/installation-files.html#the-packs-element-packs" rel="nofollow noreferrer">http://izpack.org/documentation/installation-files.html#the-packs-element-packs</a>.</p> <p><strong>Example</strong></p> <p>izpack install.xml is in C:\code\Widget\installer</p> <pre><code>&lt;pack name="Base" loose="true" required="yes" preselected="yes"&gt; &lt;description&gt;JVM&lt;/description&gt; &lt;file src="C:\Code\Widget\JVM" targetdir="$INSTALL_PATH"/&gt; &lt;/pack&gt; </code></pre> <p>When package up izpack installation should have:</p> <pre><code>JVM install.jar setup.exe </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload