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!

diannelopez
Posts: 1
Joined: Fri May 12, 2006 9:16 pm

Java Service - ini files

Can a Java service read parameters from a regular ini file? I have an application that can be run manually or as a service. The program reads and writes to an ini file but I do not know how to do it through a service because it does no find the file. The ini files is in the same folder as the executable program.

Thanks.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

You should set the working directory for the application by setting the "user.dir" property to the [APPDIR] property. You can do this by adding a new JVM parameter from "Virtual Machine" tab in the "Java Products" page like this:
Name=user.dir
Value=[APPDIR].

The user.dir property is used by Java to resolve the path of the application when running as a service.

Regards,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”