dlorde
Posts: 31
Joined: Tue Feb 13, 2007 3:19 pm
Location: London, UK
Contact: Website

Java classpath fault in multi-build project MSI

Having updated from AI 7.4 to 7.6, I built our Java product installers using the AI multi-build project that worked fine with AI 7.4.

This project produces 3 Java installers, an EXE version and two MSI versions, one with dialogs and one without (unprompted).

The AI project build produced the 3 installers, but when they were run, the EXE worked OK, but the two MSI installers installed an INI file with an empty classpath - not completely empty, it had the correct number of semi-colons to separate the jar entries, but it was missing the jar entries themselves. The actual jars were installed as expected, but couldn't be found when the application was run because of the missing classpath entries.

I tried removing and re-adding all the Jar files in the Java Products/Settings screen and the Files & Folders screen, and regenerating the builds, but the problem persisted.

When I tried generating the same MSI installers using separate AI projects, they worked OK, producing correct classpath entries in the INI file, so it looks like the multi-build Java option is broken in some way, which is a pain.
dlorde
Posts: 31
Joined: Tue Feb 13, 2007 3:19 pm
Location: London, UK
Contact: Website

Re: Java classpath fault in multi-build project MSI

I suspect some project corruption is involved, as I find sometimes the jar files themselves are not installed...
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Java classpath fault in multi-build project MSI

Hi,

Perhaps something is configured per-build and it's not included in the MSI builds. Can you please send us the .AIP (project) file you are using to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dlorde
Posts: 31
Joined: Tue Feb 13, 2007 3:19 pm
Location: London, UK
Contact: Website

Re: Java classpath fault in multi-build project MSI

OK, I'll send in the .AIP.

Thanks.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Java classpath fault in multi-build project MSI

Hi,

I noticed that all the class path JARs are placed in a single component which is present only in a single feature. Please share this component with all three features. Also, you can try disabling the folder synchronization. Perhaps the files are removed and re-added by it under the current feature when you make modifications on disk.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dlorde
Posts: 31
Joined: Tue Feb 13, 2007 3:19 pm
Location: London, UK
Contact: Website

Re: Java classpath fault in multi-build project MSI

Thanks for the rapid response, Cosmin.
I noticed that all the class path JARs are placed in a single component which is present only in a single feature. Please share this component with all three features.
When adding the classpath jars, I ensured that the 'All Features' option (which is the default) was selected. This worked OK with the previous version of AI...

However, looking at the 'Features and Components' tree, I see that there is a 'component' that has the name of one of the jars, and all the jars are included under this component (including the jar with the component name!). This component is only present in one feature as you suggest. This is clearly incorrect - and presumably is causing the problem. Also the component should not be named after an arbitrary jar...

I have renamed this component to 'Application Jars', and copied (shift-dragged) it across to the the other features, so they all have the component containing the jars. The build seems to produce correct installers now - can you just confirm that what I did sounds right?

Thanks again,

Dave
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Java classpath fault in multi-build project MSI

Hi Dave,

Yes, this is the correct approach. Like I mentioned in my previous post, the JAR files may have been removed and re-added under the current feature by the folder synchronization when you made modifications on disk.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dlorde
Posts: 31
Joined: Tue Feb 13, 2007 3:19 pm
Location: London, UK
Contact: Website

Re: Java classpath fault in multi-build project MSI

Cool. I have unchecked the synchronization feature in case that contributed to the problem.

Currently all is working well.

Thanks again for your excellent support!

Dave

Return to “Common Problems”