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
Copy file name to clipboardExpand all lines: support/power-platform/power-automate/desktop-flows/ui-automation/cannot-access-java-application-elements.md
+28-27Lines changed: 28 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
-
title: Can't access elements of a Java application
2
+
title: Can't Access Elements of a Java Application
3
3
description: Troubleshoot the issue that Power Automate for desktop can't access the elements of a Java desktop application.
ms.custom: sap:Desktop flows\UI or browser automation
7
7
---
8
8
# Can't access the elements of a Java application
9
9
10
-
When [automating Java applications](/power-automate/desktop-flows/how-to/java) by using 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.
10
+
When [you automate Java applications](/power-automate/desktop-flows/how-to/java) by using Power Automate for desktop, you experience an issue in which Power Automate can't access the UI elements of the Java application. This article helps you troubleshoot this issue.
11
11
12
12
_Applies to:_ Power Automate
13
13
_Original KB number:_ 5014922
@@ -18,25 +18,26 @@ Power Automate for desktop can't access the UI elements of a Java desktop applic
18
18
19
19
## Diagnose using the troubleshooter
20
20
21
-
To solve this problem, first try the [troubleshooter](/power-automate/desktop-flows/troubleshooter):
21
+
To resolve this problem, first try the [troubleshooter](/power-automate/desktop-flows/troubleshooter):
22
22
23
23
1. In Power Automate for desktop, go to **Help** > **Troubleshooter**, and then run the [troubleshooter](/power-automate/desktop-flows/troubleshooter).
24
24
25
25
1. In the **Troubleshooter** window, select **Run** on the **Troubleshot UI/Web automation issues** panel.
26
26
27
27
1. If the troubleshooter finds an issue for **Java Automation**, expand the panel to see the details.
28
28
29
-
1. If a **Fix** button is available, select it to apply the fix. Make sure you close all running **Java** applications before applying the fix.
29
+
1. If a **Fix** button is available, select it to apply the fix. Make sure that you close all running **Java** applications before you apply the fix.
30
30
31
-
If the problem persists after using the troubleshooter, follow the steps in [Manual troubleshooting](#manual-troubleshooting) to further troubleshoot the problem.
31
+
If the problem persists after you use the troubleshooter, follow the steps in [Manual troubleshooting](#manual-troubleshooting) to further troubleshoot the issue.
32
32
33
33
## Manual troubleshooting
34
34
35
-
Use these steps only if the troubleshooter finds no Java installations or can't configure the environment.
35
+
> [!NOTE]
36
+
> Use these steps only if the troubleshooter finds no Java installations or can't configure the environment.
36
37
37
-
### Configure Java (for Java 7 and 8)
38
+
### Configure Java (for Java 8 and 7)
38
39
39
-
Use these steps to troubleshoot Java 7 and 8. If you're using Java 9 or later, see [Configure Java (for Java 9 and later)](#configure-java-for-java-9-and-later).
40
+
Use these steps to troubleshoot Java 8 and 7. If you're using Java 9 or a later version, see [Configure Java (for Java 9 and later)](#configure-java-for-java-9-and-later).
40
41
41
42
#### Locate the Java installation folder
42
43
@@ -47,60 +48,60 @@ Use these steps to troubleshoot Java 7 and 8. If you're using Java 9 or later, s
47
48
48
49
1. Open Task Manager.
49
50
50
-
1.Find the `java.exe` process, right-click it, and then choose**Open file location**.
51
+
1.Locate and right-click the `java.exe` process, and then select**Open file location**.
51
52
52
-
1. Use that folder as `<JRE_HOME>\bin`.
53
+
1. Use the selected folder as `<JRE_HOME>\bin`.
53
54
54
55
To avoid this issue in the future, install Java under `Program Files` or enable the option to register Java in the system registry during installation.
55
56
56
57
#### Copy required files (administrator rights required)
57
58
58
-
Copy these files from the Power Automate for desktop installation folder (`C:\Program Files (x86)\Power Automate Desktop\dotnet\java-support`):
59
+
Copy the following files from the Power Automate for desktop installation folder (`C:\Program Files (x86)\Power Automate Desktop\dotnet\java-support`):
59
60
60
61
-`PAD.JavaBridge.jar` to `<JRE_HOME>\lib\ext\`
61
62
-`Microsoft.Flow.RPA.Desktop.UIAutomation.Java.Bridge.Native.dll` to `<JRE_HOME>\bin\` (x86 or x64 depending on the Java architecture)
62
63
63
64
#### Update accessibility configuration
64
65
65
-
1. Open `<JRE_HOME>\lib\accessibility.properties` in a text editor. Create the file if it doesn't exist.
66
-
1. Add or update this line:
66
+
1. Open `<JRE_HOME>\lib\accessibility.properties` in a text editor. If the file doesn't exist, create it.
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.
71
+
If the line starts with the number sign (`#`), remove the `#` character to uncomment it. If other assistive technologies are listed, append the Microsoft value at the end, separated by a comma.
71
72
72
73
> [!NOTE]
73
-
> Manual file placement works only for Java 7 and 8. Java 9 and later don't support loading assistive technologies by this method.
74
+
> Manual file placement works for only Java 8 and 7. Java 9 and later versions don't support using this method to load assistive technologies.
74
75
75
76
### Configure Java (for Java 9 and later)
76
77
77
-
For Java 9 and later versions, you can't modify the Java installation in the same way. Use one of the following methods instead.
78
+
For Java 9 and later versions, you can't modify the Java installation in the same manner. Instead, use one of the following methods.
78
79
79
80
#### Set environment variable (recommended)
80
81
81
-
Set a system or user environment variable named `JDK_JAVA_OPTIONS`with this value (64-bit example):
82
+
Set a system or user environment variable that's named `JDK_JAVA_OPTIONS`and has the following 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`)
93
+
-`-Djava.library.path="<PAD install path>\dotnet\java-support\x64"` (for 32-bit Java, use the `x86` folder instead of the `x64` folder)
93
94
94
95
## Key clarifications and troubleshooting tips
95
96
96
-
- Always try the Power Automate for desktop Troubleshooter first. It's the safest and fastest method to configure Java automation.
97
-
- Manual file placement applies only to Java 7 and 8. Use the environment-variable or JVM-argument method for Java 9 and later.
97
+
- Always try the Power Automate for desktop troubleshooter first. It's the safest and fastest method to configure Java automation.
98
+
- Manual file placement applies only to Java 8 and 7. Use the environment-variable method or JVM-argument method for Java 9 and later.
98
99
- Java versions earlier than 7 aren't supported.
99
-
- The attach mechanism might not work reliably with Java 9 or Java 10.
100
-
-Use Task Manager to find the Java executable path when an application uses an embedded runtime.
101
-
-You need administrator rights to place files in Java installation folders.
102
-
- If you placed the files manually, they aren't 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.
103
-
- After making changes, close all running Java applications. Restarting the PC is recommended.
100
+
- The attach mechanism might not work reliably for Java 10 or Java 9.
101
+
-If an application uses an embedded runtime, use Task Manager to find the Java executable path.
102
+
-To be able to insert files into Java installation folders, you must have administrator rights.
103
+
- If you insert the files manually, the files aren't updated automatically when Power Automate for desktop is updated. To use the latest Java automation files, repeat the manual file placement after each Power Automate for desktop update.
104
+
- After you make the changes, close all running Java applications, and then restart the computer.
0 commit comments