graemeh
Posts: 1
Joined: Wed Feb 23, 2005 12:10 pm

Relative Path names in classpath

Hi all,

I've just recently purchased Advanced Installer for our Java solution. I was quite impressed with the product, but have hit a major snag that is preventing me from using it.

In order to ease upgrade, versioning and jre issues, our app is installed on a file server and the installation folder is shared. On the workstations we map a network drive and execute the app from the shared folder. Unfortunately, the ini files created for java products use absolute path names for the classpath instead of relative paths. This means we cannot run the app from the workstations.

I have tried many different methods to try to get around this, but the product seems to block me at every turn. JVM parameter fields are too short to allow our full classpath to be passed to the vm, ini files cannot be editted, only installed files can be added to the classpath, etc etc.

Has anyone got any idea how I can bypass this problem, or should I just call it quits. Any help would be appreciated.

Thanks,

Graeme
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Hello,

IDEA 1
--------

The only way to get rid of absolute paths in that INI is by using a Custom Action that transforms the paths from the class path from absolute to relative.

This custom action should be scheduled in the commit time where it is a deffered custom action.

Your CA (can be made in java) must know the location of the ini file to transform. If it is an EXE, pass the path of the java product (the associated ini file is in the same directory, has the same name and the ini extension) by command line. If it is not exe you must know how to transfer data to defferred csutom actions (see the forum).

IDEA 2
-------

Install the application INTO the shared folder (even on server) and make sure the mapped folder is named the same for everywhere.

To do that, change Application Folder in Install Parameters (like \\philip\Shared).

Hope that helps,
Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Phill
Posts: 10
Joined: Mon Apr 03, 2006 4:37 am

Relative Jar Path

Hi,

I also would like to use a relative classpath. I share an application from the network. We will NOT use Mapped drives as using UNC paths is less error prone it also simplifies client installation.

I have modified the INI file and it works using UNC paths.
Why can't you change Advanced installer to use either absolute or relative classpaths ? It doesn't seem like a difficult change.

Having to change the INI file using custom actions seems really messy.

Thanks,

Phill
Phill
Posts: 10
Joined: Mon Apr 03, 2006 4:37 am

As Advanced installer only allows you to select JAR files under the application install directory why doesn't it use Relative classpaths ?

Using them would add more functionality without causing any problems.

I could write my own exe's but that means I don't need to use the Java version of your installer.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

You can create Properties in the Install Parameters page and set their value to the relative path of your "jar" files and/or folders.

Then, add these Properties in the Classpath (using the "Property" button in the Java Products page), instead of adding the jars/folders.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”