You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ms.custom: sap:Desktop flows\UI or browser automation
8
7
---
9
8
# Can't access the elements of a Java application
10
9
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.
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.
19
18
20
-
## Troubleshooting steps
19
+
## Diagnose using the troubleshooter
21
20
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):
23
22
24
23
1. In Power Automate for desktop, navigate to **Help** > **Troubleshooter**, and then run the [troubleshooter](/power-automate/desktop-flows/troubleshooter).
25
24
@@ -29,54 +28,68 @@ To solve this issue, try the [troubleshooter](/power-automate/desktop-flows/trou
29
28
30
29
4. If a **Fix** button is available, select it to apply the fix. Ensure all running **Java** applications are closed before applying the fix.
31
30
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.
33
32
34
-
## 1. Manually configure Java (only for Java 7 and 8)
33
+
## Manual troubleshooting
35
34
36
35
Use these steps only if the troubleshooter finds no Java installations or cannot configure the environment.
37
36
38
-
### A. Locate the Java installation folder
37
+
### Configure Java (for Java 7 and 8)
39
38
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).
43
40
44
-
###B. Copy required files (administrator rights required)
41
+
#### Locate the Java installation folder
45
42
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`):
47
59
48
60
-`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)
50
62
51
-
###C. Update accessibility configuration
63
+
####Update accessibility configuration
52
64
53
65
1. Open `<JRE_HOME>\lib\accessibility.properties` in a text editor. Create the file if it doesn't exist.
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.
59
71
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.
61
74
62
-
##2. Workaround for Java 9 and later (or when file placement is not possible)
75
+
### Configure Java (for Java 9 and later)
63
76
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.
65
78
66
-
###A. Set environment variable (recommended)
79
+
####Set environment variable (recommended)
67
80
68
81
Set a system or user environment variable named `JDK_JAVA_OPTIONS` with this value (64-bit example):
-`-Djava.library.path="<PAD install path>\dotnet\java-support\x64"` (for 32-bit Java, use the `x86` folder instead of `x64`)
80
93
81
94
## Key clarifications and troubleshooting tips
82
95
@@ -89,9 +102,9 @@ Append these arguments to the app's Java startup command:
89
102
- 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.
90
103
- After making changes, close all running Java applications. Restarting the PC is recommended.
0 commit comments