We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Ruben
Posts: 57
Joined: Fri Apr 10, 2015 2:35 pm

Understanding the Java Bundle Feature

AdvancedInstaller has the Bundle JRE feature. I've used it this way:

In Resources/Java Products/Settings, specify an installed JRE directory to be bundled
Just watch how AdvancedInstaller puts Java files in a jre/ subdirectory (by default) of the Application Folder. Obviously, this assumes a JRE is regularly installed on the development system.
Define one or more Java Product in Resources/Java Products/Products, and configure Java options here.

Let's say, this is Method 1. Alternatively, there is

Method 2:
Copy a complete Java (JRE) directory in the Application Folder.
AdvancedInstaller, probably, is not be aware this is a JRE. It should treat it as folder with arbitrary resources.

To later run the application, add a simple .bat file in the application folder:

Code: Select all

  jre/bin/java -jar OurFineApplication.jar
I did so and everything worked fine. Configuring Java with command line options was even easier than with Method 1. It happens in the batch file, thus beeing part of our managed source code. With method 1, Java parameters are maintained in the installers GUI.
Furthermore, Method 2 does not require the bundled JRE to be installed on the development system.
Note: It's even possible to mix both Methods by bundling a JRE (Method 1), but starting with the batchfile of Method 2.

Now, what exactly does Method 1 ? What are the benefits ?
(Note that this is not about saving the licence fee but about really understanding the Java feature.)

Many Thanks,
Ruben
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Understanding the Java Bundle Feature

Hello Ruben,

As you already observed you can build a Java application installer in both ways. The main advantages of our "Java Products" feature is the use of our "Native Java Launcher" and the ability to build Mac OS X packages for your Java application.

The "Native Java Launcher" offers you a more friendly and smooth UX by catching and throwing user more suggestive error messages and allows you to quickly configure the JVM parameters, to use a splash screen, an icon for your java product, etc. Also, when using a "Native Java Launcher" it is not mandatory to bundle the JRE in your setup package. You can add JRE as a prerequisite or simply as a launch condition and after installation the "Native Java Launcher" will automatically detect and use the installed JRE.

However, if you choose not to use our predefined support for Java application (available only from a "For Java" license edition), then you can use as well the "Professional" edition of Advanced Installer to create an installer in the way you related (i.e. Method 2).

If you have any questions or doubts just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”