MarioAquino
Posts: 2
Joined: Thu Oct 28, 2010 3:57 pm

Wildcard classpath specification

I need to specify the jars for my application dynamically (at runtime) and I would like to use wildcarding so that all jars found within the wildcarded directory will be included in the classpath. This capability is supported when launching the JVM from the command line but I can't seem to get it to work with the native launcher.

For example, if I have a jar called foo.jar that contains my main class com.foo.Main, on the command line I can specify the following to launch my application:

java -classpath *; com.foo.Main

Executing this from the command line (assuming that the command is run in the directory where foo.jar resides) works correctly. However, I cannot figure out how to express the same thing using the native launcher for Advanced Installer. In my application, I have all of my jars in a directory called "jars" and I would like to tell Advanced Installer to include all jar files found in that directory in the classpath. I *DO NOT* want to explicitly declare the jars (through the GUI) when my application installer is being built. In my application, the jars included in the classpath may change after it has been installed so I need flexibility in the classpath declaration.

I read a solution described here: http://www.advancedinstaller.com/forums ... ath#p26299 but what that seems to be explaining is a way to dynamically add directories to the classpath, when what I actually want is to either declare individual jars at application start time or use wildcards so that all jars found within a directory will be included in the classpath.

I have been using your tool for several weeks and I *really* like it. This classpath issue is the last problem that my application needs to solve.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Wildcard classpath specification

Hi,

Currently this is not supported by Advanced Installer. However, I added this improvement on our TODO list and it will be available in a future version. Thank you for your suggestion. Until then a solution is to update the classpath manually when necessary.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hilbe
Posts: 1
Joined: Tue Feb 15, 2011 9:39 am

Re: Wildcard classpath specification

Hello,

Any news on this?

Doesn't seem to be supported in the current version 8.0.2. Any schedule?

Regards,
hilbe
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Wildcard classpath specification

Hello Hilbe and welcome to the Advanced Installer Forums,

This improvement is currently on the development's team TODO list and will be included in a future version. Unfortunately, I cannot provide an exact release date or version.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mchristianson
Posts: 19
Joined: Sat Jan 10, 2009 1:43 am
Location: Phoenix, USA
Contact: Website

Re: Wildcard classpath specification

It's been almost three years, would someone at Caphyon comment and let us know if this feature has been added and in which version?

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

Re: Wildcard classpath specification

Hello,

First of all we apologize because we've omitted to add an heads up to this thread when this improvement was added.

This improvement is available starting with version 8.2 of Advanced Installer application. In order to add wildcard components to the Classpath you can go to "Java Products" page, select your java product and from its "Settings" tab use the [ *.jar... -> Custom...] button to add a new "Classpath" location.

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

Return to “Common Problems”