Classpath / Resource issues
Self-Extracting JarAntInstall supports delivering the installation package as a self extracting Jar. In Windows if the Java installer from Sun has been used and the default application for files that end in
If all classes are packaged in a single Jar everything is on the same classpath, this is useful for almost all situations. However, if your installer absolutely requires separate classpaths, for example if custom tasks have clashing dependencies, the classpath must be defined as it would in a normal Ant build. To achieve this you will have to package the Jars in a self-extractor or, for the non-extractor, extract the Jars to temporary space first.
If delivering an installer on a CDROM there is no need to package the installer as a single Jar. In which case the following applies.
Install ScriptsFor Linux installations.
It is recommended to tar and gzip the components with the
For Window$ installations.
For windows installations it is better to use the ZIP compression format. The demo app includes an example of a windows start script (
Currently both example install scripts rely on a system property called %JAVA_HOME% since this is standard for most Java deployments. If this is a problem get in touch and I can write some scripts to check standard locations for the Java binary. It is also possible to deliver Java with your app, but you will need to check with the Sun licenses as to weather this is permitted or not, and users will have a heafty download.
It may be better to specify the Java command as just
ClasspathThe developer creating the installer should ensure that all references in the install script are correct when the script is run. In the AntInstall demo the
It is currently possible to include a directory called
With self extracting jars all classes should be packaged in the root of the Jar file.
ResourcesA further classpath consideration is the location of the images for the GUI. They must be on the classpath when the AntInstaller runs in the
Java versionThe required Java version is 1.4 or above. It may be possible to get AI working on 1.3 provided that the JGoodies look and feel is NOT used and regular expressions are not used. Also the XML parsers and APIs will have to be added to the classpath.
If regex and 1.3 are a requriement of yours, it is possible to hack the code to use the Apache regex parser included with Ant. There have been problems with this code and so it is not included by default. Please get in contact if you would like to work on this feature.