Problem with Java-application when running process from Orchestrator

Hello friends, I have a problem with one of mye processes where I’m opening a Java-application.

The Java-application is a jar-file that is dependent on a properties located in c:\users\myuser\AppData\Roaming\MyJavaApp\myapp.properties

Among other things this properties file contains some credentials necessary to start the application.

When running my process from UiPath Studio everyting works fine and the application starts. Also when starting the process from Orchestrator while having a Remote Desktop window to the robot open, the application also opens fine. I can also start the Java-application manually while logged in to the robot through RDP.

But when running the process from Orchestrator without having a RDP-window open, then the Java-application seems to start without reading the properties-file. I know this because I have set up the process to send me a screenshot, and there I can see that the application prompts for credentials.

The application is opened with the Start Process activity like this:
image

Any help would be greatly appreciated. It’s been a while since I’ve done any Java-programming so my skills are a bit rusty in regards to things like classpath’s, arguments and such.