Jump to content
Excelsior Forums
Sign in to follow this  

Excelsior Windows Service runs with "user.dir" set to C:\Windows\System32.

Recommended Posts


I have a java program that I converted and compiled to a windows service using Excelsior.

A problem a rised when the java program tried to read the configuration file.

The java programs tries to access the "conf" using a relative path "../conf/myprogram.conf".

As a windows service, reading the configuration file fails since the "user.dir" is set to C:\Windows\System32 instead of the original location of the executable.

Anyone got a neat solution to this problem?

Share this post

Link to post
Share on other sites

There is a simple solution for you. Set "user.dir" Java property explicitly to appropriate value. After that specify also "jet.cd.to.user.dir" property (no value).

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this