How to access APPDIR in Java service - Advanced Installer Community
HH3
Posts: 1
Joined: Mon Sep 05, 2016 10:49 am

How to access APPDIR in Java service

Hi,

I have created a Java service project including properties file in the installation folder.
How can I get the installation path (APPDIR) so that the service can read the properties file?

Many thanks!

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

Re: How to access APPDIR in Java service

Hello HH3 and welcome to our forums,

To achieve what you need you can add the following formatted reference:

Code: Select all

[APPDIR]
in the "Arguments" field of your defined service in "Services" page. This way the APPDIR path will be always passed to the service when started.

If you have any questions let us know.

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

Return to “Common Problems”