### **Description of issue**

Leapwork is designed to fully support Java desktop applications, allowing users to capture any control inside of Java applications. However, few users have experienced difficulties due to various factors resulting in capture related errors _or_ applications getting crashed _or_ Leapwork being hanged.

### **Steps to resolve**

1. Validating installation of Java components on respective machines using Leapwork Studio/Agent
2. Configuring respective environment variables with appropriate values
3. Enabling of Java Access Bridge

### Step 1.

As a pre-requisite to troubleshoot, we need to ascertain **whether Java is installed on the user's machine**. We can do this via launching command prompt and executing the command _java -version_

If there is no Java present, this command will result in an error. And we can proceed with installing the latest Java from the below links, basis the machine configuration

If there is Java installed, the above statement should return the details of the installed version. Additionally, we need to verify the different components installed via **Control Panel\All Control Panel Items\Programs and Features -**

****

For if Java is found to be installed, we need to check the environment variables configuration and Java Access Bridge configuration as well. These can be found post the installation section details.

#### Installing Java components

|     |     |
| --- | --- |
| **For Win 64 bit configuration** |
| Click on Download button on landing page for latest version | [Java for Windows 64 bit](https://java.com/en/download/ "https://java.com/en/download/") |
| Download jdk-8u291-windows-x64 | [JDK for Windows 64 bit](https://www.oracle.com/java/technologies/downloads/#java18) |

Once the above mentioned components are installed, you will see below 2 elements under Apps & Features :

|     |
| --- |
|  |

### Step 2.

**Environment variable**
Once the installation is confirmed, type ‘ _Edit environment variables for your account'_  in the Windows Search box and add new or _edit existing_ 'Path'  environment variable:

- Variable name = ‘Path’
- Variable value = ‘C:\Program Files\Java\jdk1.8.0\_291\bin;C:\Program Files\Java\jre1.8.0\_291\bin;'

Where _C:\Program Files\Java\jre1.8.0\_291_– path to JRE and similarly for JDK as installed. This path _**may**_ vary given the latest releases at the time of performing the installation

|     |
| --- |
|  |

### Step 3

#### Java Access Bridge

**Enabling Java Access Bridge**

In Windows Vista and later, one can enable Java Access Bridge through the Control Panel:

_Go to Start > Control Panel > Ease of Access > Ease of Access Center_. Alternatively, press Windows logo _key+u_ to access the Ease of Access Center.

Select Use the computer without a display.

In the section, Other programs installed, select the check box Enable Java Access Bridge (one may have to scroll down).

**Note:** After enabling Java Access Bridge, one must restart their assistive technology software and Java applications that use the accessibility API.

**For installation of Java Access bridge**

Please [click here](https://support.leapwork.com/s/article/JavaAccessBridge6330830438679) .
