DavidPayne
Posts: 19
Joined: Fri Aug 31, 2007 1:26 pm

File Association - Set Working Directory

Hi,

Sorry if this has been discussed, but not sure what to search for.

Basically, my Java application uses the current working directory to locate various resources, that sit in the application folder, alongside the executable.

That's fine when starting the software from a shortcut, but when I'm starting it from a file association (so, double-clicking a file that is associated with my application), that working directory is the location of the file, not the location of the executable.

I also use install4j, and it is able to set the working directory as the path to the executable, rather than the file. Is there a setting in AI that allows me to do the same? Or any alternative?

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

Hi,

You need to set an option in order to apply this feature.
In the "Java Products" page, "Settings" tab, "Application" section you check the "Set current directory to product folder" option. This will set the working directory to the location of the executable.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DavidPayne
Posts: 19
Joined: Fri Aug 31, 2007 1:26 pm

Sorry - that was really obvious! I honestly did spend ages looking!

Thanks very much for the speedy response!

Return to “Common Problems”