Automation with jnlp app

Hi, I have this wierd scenario which I cannot figure out -

In my project, I use StartProcess to launch a bat file that would call on javaws “xxx.jnlp” to launch my application (the jnlp file is from a remote server). When done from UI Studio (by testing the StartProcess activity), UI Explorer is able to detect the application and selectors just fine.

However, when I manually launch the bat file and then use UI Explorer to try to find the selectors, it prompts that Java extension is not found and ask me to install.

Why is this difference happening? Under the Java folder, I have already followed the troubleshooting steps here: Studio - Java extension troubleshooting

Thanks.

Hello @wendy.pang Welcome to the UiPath Community Forum

Can you please confirm if the 'JAVA_PATH → Environment Variable is correctly set and Global.
Also, please verify the JAVA Access Bridge is de-selected for all.

There might be a situation as the loading the Jnlp file using UiPath Activity is loading the configuration properly but when you try with your profile (manually), its not loading.

These are just assumptions.

Regards,
Shantanu

Thanks @shantanu_chande

Yes, the environment variable is correct set and global. Java Access bridge is also de-selected (from Control Panel → Ease of Access Center → Make computer easier to see).

What I noticed is, when launched from UiPath Studio test activity, there is an additional dll loaded when I examine the dlls under jp2launcher.exe using Process Explorer: UiPathJavaBridgeImplV8.dll. This loads from the user .nuget\packages\UiPath\21.10.49.13436\UiPath folder.

@wendy.pang That explains why JNLP running with UiPath properly. Can you check equivalent jar for JAVA SDK, so that assembly will loaded.

Thanks. I launched the Java console and enabled tracing. In the Java console, I see this error when I use UI Explorer to select the opened application -
LoadNewBridgeImpl jarpath: C:\Users.…\build\UiPath\JavaSupport
adding jaccess.jar url: file:/C:/Users/…/JavaSupport/jaccess.jar
java.lang.UnsatisfiedLinkError: UiPathV8.UiPathTrace.trace(Ljava/lang/String;I)V

When I try to run the published package from orchestrator in unattended mode, I noticed that the java trace log has this something similar, except with this line:
loadUiPathBridgeDll - java.lang.UnsatisfiedLinkError: C:\Users.…\UiPathJavaBridgeImplV8.dll: %1 is not a valid Win32 application
loadUiPathBridgeDll - java.lang.UnsatisfiedLinkError: Can’t load library: C:.…\UiPathJavaBridgeImplV8.dll.
The run then fail with errors like “Could not find the user-interface (UI) element”.
It works fine when I run the project in UI Studio or in attended mode, i.e., trigger from orchestrator with the robot machine logged in and opened remotely.

I am running on Windows 10 and the Java version I am using is 1.8.0_181, 32bit.

Any idea on how to resolve this error?

Thanks!

Hi @wendy.pang ,

Please give UiAutomation 23.4 a try.
In the past, it was really hard to inject into Java applications run under Java Web Start protocol (.jnlp file type apps).

With newer versions of UiAutomation, no special configuration needs to be done for the extension to be properly loaded. Using the UiExplorer directly over the application should work by default.

Thanks Vlad, I updated to UiAutomation package v23.10.6, still same issue. Do I need to do anything else for the existing Java Extension installations?

No other step is needed when using UiAutomation 23.10. It seems a little bit strange. And the behavior is the same: works when launched from Studio but it doesn’t work when launched from the bat file?

Does the application have the same command line parameters when launched in the two scenarios? (You can use Process Explorer - Sysinternals | Microsoft Learn to check this by indicating over the desired process, right-clicking, going to Properties → Image and then getting the content of the Command Line Field.)

For example → these is the command line for the UiPath Assistant:

Hi Vlad,

Yes, both have the same command line: