Features Ptolemy II needs

List of installers

Free Installers

izPack says:
The IzPack native launcher will first check for a JRE on the target system. If one is found, then it will launch the installer. If no JRE can be found, then it will help the user in installing one either from the internet or from a bundled one. To sum-up, the IzPack native launcher will allow your users to install your software even if they don't have a JRE at first sight.
The IzPack native launcher is a .exe file that looks for a file called launcher.ini in the current directory. The launcher.ini specifies: Notes about IzPack Launcher and possible alternatives
Can include a JRE, but really only for one application? We need to add multiple apps to the Start Menu.

Commercial installers

Ptolemy installers

To install Ptolemy under Windows, we require an optional custom JRE.

The way we do this is based on Notes about IzPack Launcher and possible alternatives.

  1. We create an izPack installer that installs Ptolemy II
  2. We use launch4j to invoke the izPack installer. The launch4j installer includes an optional JRE.
  1. Create a jre that has JAI, Java 3D, Joystick JMF, JavaComm, X10 etc. in it. See Optional packages not shipped with Ptolemy used at runtime
  2. Copy this jre to $PTII/adm/gen-X.Y/jre

IzPack notes

Things I wish were different

These notes are for IzPack 3.9.0-M1, from September 9, 2006.

Building IzPack

IzPack Developer's page
  1. Download from the trunk
    	    svn co
  2. I followed the Eclipse instructions from the IzPack 3.9.0-M1 release One change was that when setting up the debug, I used
    	    c:\cxh\ptII\adm\gen-6.0\ptII6_0-devel_setup.xml \
    	    -b c:\cxh\ptII\adm\gen-6.0 \
    	    -o c:\cxh\ptII\adm\gen-6.0\ptII6_0-devel_setup.jar \
    	    -h c:\cxh\src\izpack\trunk
    My IzPack configuration file, usually called install.xml
    -b c:\cxh\ptII\adm\gen-6.0
    The base for my build
    -o c:\cxh\ptII\adm\gen-6.0\ptII6_0-devel_setup.jar
    The file to output
    -h c:\cxh\src\izpack\trunk
    The IzPack source directory.
  3. Problems:
    No valid IzPack home directory found
    Building in Eclipse fails with:
    		-> Fatal error :
    		No valid IzPack home directory found
    		java.lang.IllegalArgumentException: No valid IzPack home directory found
    		at com.izforge.izpack.compiler.CompilerConfig.resolveIzPackHome(
    		at com.izforge.izpack.compiler.CompilerConfig.main(
    		at com.izforge.izpack.compiler.Compiler.main(
    The solution is to copy ShellLink.dll
    		cp c:/Pro*/izpack/bin/native/izpack/ShellLink.dll izpack
    Uninstaller not found: c:\cxh\src\izpack\trunk\lib\uninstaller.jar
    Building in Eclipse fails with:
    		-> Fatal error :
    		c:\cxh\ptII\adm\gen-6.0\ptII6_0_devel_setup.xml:18: Uninstaller not found: c:\cxh\src\izpack\trunk\lib\uninstaller.jar
    		com.izforge.izpack.compiler.CompilerException: c:\cxh\ptII\adm\gen-6.0\ptII6_0_devel_setup.xml:18: Uninstaller not found: c:\cxh\src\izpack\trunk\lib\uninstaller.jar
    		at com.izforge.izpack.compiler.CompilerConfig.parseError(
    		at com.izforge.izpack.compiler.CompilerConfig.findIzPackResource(
    		at com.izforge.izpack.compiler.CompilerConfig.addInfo(
    		at com.izforge.izpack.compiler.CompilerConfig.executeCompiler(
    		at com.izforge.izpack.compiler.CompilerConfig.main(
    		at com.izforge.izpack.compiler.Compiler.main(
    Solution, use ant:
    		cd trunk/src
    		ant dist
    I'm not sure how to do this from Eclipse. Eclipse can run ant but the setup instructions have us include files from src/lib, not src.
    Problems with the uninstaller
    The Uninstaller was failing for me, see The Unistaller.jar is not working

    I had a problem with OsVersion missing when I ran

    		  java -version uninstaller.jar

    The solution was to check out the 3.9 branch and rebuild:

    		  svn co
    		  cd 3.9.0-M1/src

    I also had to edit build.xml so that we included izpack/util/os/*.class as per The Unistaller.jar is not working


    It turns out that part of the install process updates uninstaller.jar. So, I had to copy the uninstaller.jar file over to the installed version of IzPack - copying uninstaller.jar to the installed application will not do it.

Setting up IzPack to unjar source files

We want to IzPack to unjar the source file because it is faster to create an installer that has one jar file in it than it is to create an installer that has multiple (many thousand) files.

The solution is to use the ProcessPanel and define our own class that does the extraction.


Cannot find Resource ProcessPanel.Spec.xml for language eng
	    com.izforge.izpack.installer.ResourceNotFoundException: Can not find Resource ProcessPanel.Spec.xml for language eng
	    at com.izforge.izpack.installer.ResourceManager.getLanguageResourceString(
	    at com.izforge.izpack.installer.ResourceManager.getInputStream(
	    at com.izforge.izpack.installer.ProcessPanelWorker.readSpec(
	    at Source)
	    Error parsing XML specification for processing.
Add the following to the configuration file
	    <res src="ProcessPanel.Spec.xml" id="ProcessPanel.Spec.xml"/>
"Cannot find processing class"
The class needs to be present in the jar file that is created by IzPack. We use the -u command:
	    jar -fu c:/Program\ Files/IzPack/lib/installer.jar ExtractJarFile.class 

We also have to update the standalone-compiler.jar file with the new installer.jar file. My solution was to rebuild izPack and run

      cd izpack/trunk/src
      rm ../lib/installer.jar
      ant build.installer
      jar -uf ../lib/installer.jar ExtractJarFile.class
      ant build.standalone-compiler
      cp ../lib/standalone-compiler.jar ../../izpack3.9.0/lib/standalone-compiler.jar

However, a better solution is to use <jar src="ExtractJarFile.jar"> in the install.xml file

Error accessing processing class
I modified src/lib/com/izforge/izpack/installer/ so that it printed the exception, which was Class com.izforge.izpack.installer.ProcessPanelWorker$ExecutableClass can not access a member of class ExtractJarFile with modifiers "private".
The fix was to change ExtractJarFile so it no longer had a private constructor.

Packaging for the Mac

Between Java 1.6, distributed by Apple, and Java 1.8, distributed by Oracle, the process for creating a Java Mac application changed.

How the Mac apps are created

$PTII/bin/ is read by $PTII/configure and $PTII/bin/ptinvoke is created. $PTII/bin/makeapp is a symbolic link to ptinvoke. Running make in $PTII/bin invokes makeapp and creates $PTII/bin/ and $PTII/bin/

Double clicking on or invokes a binary listed in Info.plist. The binary changed between Java 1.6 and 1.8.

Packaging Java for distribution on the Mac under Java 1.8

In Java 1.8, we used, which uses the Application Bundler.

Application Bundler is GPL'd, but Oracle releases it using the Classpath exception. The Application Bundler jar file includes JavaAppLauncher, which gets copied to Contents/MacOS/. That executable processes the Info.plist file. The executable substitutes $APP_ROOT when it is present in the Info.plist file.

The Application Bundler will include a JRE if runtime parameter is set in the build.xml file. We do not set runtime.

The Application Builder wants to copy the jar files into Contents/Java/. Instead, we use $APP_ROOT/../.. to refer to the jar files.

We created a temporary Ant target to create a prototype app directory and then modified the file to generate the proper Info.plist file.

Last Updated: $Date: 2014-11-19 09:18:52 -0800 (Wed, 19 Nov 2014) $