Apache Commons Daemon specify classpath

1.1k Views Asked by At

I try to deploy a program as windows service with apache commons daemon. i have everything set up fine beside the classpath.

Classpath=C:\test\test-service\lib\*

specifies where the service itself lies, but the service needs some configuration files to run and these are under

Classpath=C:\test\test-service\conf\*

now i struggle to get it to work so that the program uses C:\test\test-service\* as classpath and not just one of the both specified above. sadly C:\test\test-service\* does not work and throws a ClassDefNotFoundException for the starter class. that error is solved by C:\test\test-service\lib\* but then i get the error that my config files can't be read. therefore i thought, why not also add the config path to the classpath like this:

Classpath=C:\test\test-service\lib\*;C:\test\test-service\conf\*

but this still throws the FileNotFoundException. does anyone has a solution to this?

1

There are 1 best solutions below

0
On BEST ANSWER

So I was able to solve this by myself. Following works:

Classpath= C:\test\test-service\conf\;C:\test\test-service\lib\*

it takes all files in conf folder by default as well as all files from lib as the * states