Skip to content

Commit 74c1149

Browse files
committed
edits
1 parent d85b9c7 commit 74c1149

1 file changed

Lines changed: 38 additions & 25 deletions

File tree

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
22
title: Can't access elements of a Java application
33
description: Troubleshoot the issue that Power Automate for desktop can't access the elements of a Java desktop application.
4-
ms.reviewer: pefelesk, mitsirak, nimoutzo
5-
ms.author: iomimtso
4+
ms.reviewer: pefelesk, mitsirak, nimoutzo, iomimtso, v-shaywood
65
ms.date: 11/26/2025
76
ms.custom: sap:Desktop flows\UI or browser automation
87
---
98
# Can't access the elements of a Java application
109

11-
If you encounter issues while [automating Java applications](/power-automate/desktop-flows/how-to/java) with Power Automate for desktop, follow the steps in this article to troubleshoot the issue.
10+
When [automating Java applications](/power-automate/desktop-flows/how-to/java) with Power Automate for desktop, you might experience an issue where Power Automate can't access the UI elements of the Java application. Follow the steps in this article to troubleshoot this issue.
1211

1312
_Applies to:_   Power Automate
1413
_Original KB number:_   5014922
@@ -17,9 +16,9 @@ _Original KB number:_   5014922
1716

1817
Power Automate for desktop can't access the UI elements of a Java desktop application when you use either the [Recorder](/power-automate/desktop-flows/recording-flow) or the [Add UI element](/power-automate/desktop-flows/ui-elements) action in the flow designer.
1918

20-
## Troubleshooting steps
19+
## Diagnose using the troubleshooter
2120

22-
To solve this issue, try the [troubleshooter](/power-automate/desktop-flows/troubleshooter) first.
21+
To solve this issue, first try the [troubleshooter](/power-automate/desktop-flows/troubleshooter):
2322

2423
1. In Power Automate for desktop, navigate to **Help** > **Troubleshooter**, and then run the [troubleshooter](/power-automate/desktop-flows/troubleshooter).
2524

@@ -29,54 +28,68 @@ To solve this issue, try the [troubleshooter](/power-automate/desktop-flows/trou
2928

3029
4. If a **Fix** button is available, select it to apply the fix. Ensure all running **Java** applications are closed before applying the fix.
3130

32-
If the issue persists after using the troubleshooter, follow these steps to manually troubleshoot the issue:
31+
If the issue persists after using the troubleshooter, follow the steps in [Manual troubleshooting](#manual-troubleshooting) to further troubleshoot the issue.
3332

34-
## 1. Manually configure Java (only for Java 7 and 8)
33+
## Manual troubleshooting
3534

3635
Use these steps only if the troubleshooter finds no Java installations or cannot configure the environment.
3736

38-
### A. Locate the Java installation folder
37+
### Configure Java (for Java 7 and 8)
3938

40-
- Check common paths such as `C:\Program Files\Java\jre7` or `C:\Program Files\Java\jre8`.
41-
- Some apps use an embedded Java runtime that is not registered system-wide. Start the Java application, open Task Manager, find the `java.exe` process, right-click it, and choose **Open file location**. Use that folder as `<JRE_HOME>\bin`.
42-
- To avoid this issue in future, install Java under `Program Files` or enable the option to register Java in the system registry during installation.
39+
Use these steps to troubleshoot Java 7 and 8. If you are using Java 9 or later, see [Configure Java (for Java 9 and later)](#configure-java-for-java-9-and-later).
4340

44-
### B. Copy required files (administrator rights required)
41+
#### Locate the Java installation folder
4542

46-
Copy these files from the Power Automate for desktop installation folder (C:\Program Files (x86)\Power Automate Desktop\dotnet\java-support):
43+
1. Check common paths such as `C:\Program Files\Java\jre7` or `C:\Program Files\Java\jre8`.
44+
1. Some apps use an embedded Java runtime that is not registered system-wide. To identify the location of an embedded Java runtime:
45+
46+
1. Start the Java application.
47+
48+
1. Open Task Manager.
49+
50+
1. Find the `java.exe` process, right-click it, and then choose **Open file location**.
51+
52+
1. Use that folder as `<JRE_HOME>\bin`.
53+
54+
To avoid this issue in future, install Java under `Program Files` or enable the option to register Java in the system registry during installation.
55+
56+
#### Copy required files (administrator rights required)
57+
58+
Copy these files from the Power Automate for desktop installation folder (`C:\Program Files (x86)\Power Automate Desktop\dotnet\java-support`):
4759

4860
- `PAD.JavaBridge.jar` to `<JRE_HOME>\lib\ext\`
49-
- `Microsoft.Flow.RPA.Desktop.UIAutomation.Java.Bridge.Native.dll` (x86 or x64 depending on the Java architecture) to `<JRE_HOME>\bin\`
61+
- `Microsoft.Flow.RPA.Desktop.UIAutomation.Java.Bridge.Native.dll` to `<JRE_HOME>\bin\` (x86 or x64 depending on the Java architecture)
5062

51-
### C. Update accessibility configuration
63+
#### Update accessibility configuration
5264

5365
1. Open `<JRE_HOME>\lib\accessibility.properties` in a text editor. Create the file if it doesn't exist.
54-
2. Add or update this line:
66+
1. Add or update this line:
5567

56-
assistive_technologies=microsoft.flows.rpa.desktop.uiautomation.JavaBridge
68+
`assistive_technologies=microsoft.flows.rpa.desktop.uiautomation.JavaBridge`
5769

5870
If the line starts with `#`, remove the `#` to uncomment it. If other assistive technologies are listed, append the Microsoft value at the end, separated by a comma.
5971

60-
Note: Manual file placement works only for Java 7 and 8. Java 9 and later do not support loading assistive technologies by this method.
72+
> [!NOTE]
73+
> Manual file placement works only for Java 7 and 8. Java 9 and later do not support loading assistive technologies by this method.
6174
62-
## 2. Workaround for Java 9 and later (or when file placement is not possible)
75+
### Configure Java (for Java 9 and later)
6376

64-
For Java 9+ you cannot modify the Java installation in the same way. Use one of these options.
77+
For Java 9 and later versions, you cannot modify the Java installation in the same way. Use one of the following methods instead.
6578

66-
### A. Set environment variable (recommended)
79+
#### Set environment variable (recommended)
6780

6881
Set a system or user environment variable named `JDK_JAVA_OPTIONS` with this value (64-bit example):
6982

7083
`-javaagent:"C:\Program Files (x86)\Power Automate Desktop\dotnet\java-support\PAD.JavaBridge.jar" -Djava.library.path="%PATH%;C:\Program Files (x86)\Power Automate Desktop\dotnet\java-support\x64"`
7184

7285
For 32-bit Java, use the `x86` folder instead of `x64`.
7386

74-
### B. Add JVM arguments to the Java application start command
87+
#### Add JVM arguments to the Java application start command
7588

7689
Append these arguments to the app's Java startup command:
7790

7891
- `-javaagent:"<PAD install path>\dotnet\java-support\PAD.JavaBridge.jar"`
79-
- `-Djava.library.path="<PAD install path>\dotnet\java-support\x64"` (or `x86`)
92+
- `-Djava.library.path="<PAD install path>\dotnet\java-support\x64"` (for 32-bit Java, use the `x86` folder instead of `x64`)
8093

8194
## Key clarifications and troubleshooting tips
8295

@@ -89,9 +102,9 @@ Append these arguments to the app's Java startup command:
89102
- If you placed the files manually, they are not updated automatically when Power Automate for desktop is updated. Repeat the manual file placement after each Power Automate for desktop update to use the latest Java automation files.
90103
- After making changes, close all running Java applications. Restarting the PC is recommended.
91104

92-
## More information
105+
## Related content
93106

94107
- [Automate Java applications](/power-automate/desktop-flows/desktop-flows/how-to/java)
95108
- [Troubleshoot UI automation in Power Automate for desktop](/power-automate/desktop-flows/how-to/troubleshoot-ui-automation)
96109

97-
[!INCLUDE [Third-party disclaimer](../../../../includes/third-party-disclaimer.md)]
110+
[!INCLUDE [Third-party disclaimer](../../../../includes/third-party-disclaimer.md)]

0 commit comments

Comments
 (0)