# JAVA\_HOME location must exist

**URL:** <https://forum.katalon.com/t/java-home-location-must-exist/175341>\
**Category:** Mobile Testing\
**Tags:** katalon-recorder, mobile-testing, katalon-studio\
**Created:** [June 4, 2025, 2:58am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341 "2025-06-04T02:58:44Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![suyashabob41](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/suyashabob41/32/30227_2.png) [@suyashabob41](https://forum.katalon.com/u/suyashabob41)\
**Post date:** [June 4, 2025, 2:58am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/1 "2025-06-04T02:58:44Z")

</div>

Hi everyone,

I am currently trying to use Katalon Studio for its Mobile Recorder feature to generate tests for a mobile application. I have gone through the setup instructions and installed the following:

- Appium (v1.18.1, after downgrading from v2.x)
- JDK (Java 17)
- Android Studio (latest stable)

When I run the Mobile Recorder, it shows a progress bar and logs probably initialising the app. However, right after that, I get the following error:

**Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: The JAVA\_HOME location ‘/Applications/Katalon Studio Enterprise.app/Contents/Eclipse/jre/Contents/’ must exist**

Here’s what I have tried:

- Verified the correct JDK path is set in **Katalon \> Preferences \> Java \> Installed JREs** (set my actual JDK 17 install as default).
- Updated my `~/.bash_profile` with my actual path as an env variable.
- Confirmed `java -version` and `echo $JAVA_HOME` both show the correct path.
- Tried launching Katalon Studio directly from the terminal to inherit the updated shell env.

Still, Katalon keeps falling back to the embedded Java path at `.../Katalon Studio Enterprise.app/Contents/Eclipse/jre/...` even though I removed that entry from the Installed JREs section.

Has anyone else faced this issue? Any help would be appreciated, thanks.

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [June 4, 2025, 5:36am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/2 "2025-06-04T05:36:36Z")

</div>

To resolve the **JAVA\_HOME location must exist** error in Katalon Studio when using the Mobile Recorder with Appium, follow these steps:

* * *

## **1. Ensure Katalon Uses the Correct JDK**

- **Set JDK Path in Katalon** :
  - Go to **Preferences \> Java \> Installed JREs**.
  - Remove the embedded JRE entry (`.../Katalon Studio Enterprise.app/Contents/Eclipse/jre/...`).
  - Add your JDK 17 path (e.g., `/Library/Java/JavaVirtualMachines/jdk-17.x.x/Contents/Home` on macOS).
  - Set it as the **default JRE**.

- **Verify via Terminal** :

bash

```auto
# For macOS/Linux
echo $JAVA_HOME
# Should show: /Library/Java/JavaVirtualMachines/jdk-17.x.x/Contents/Home

# For Windows
echo %JAVA_HOME%
# Should show: C:\Program Files\Java\jdk-17.x.x

```

* * *

## **2. Force Katalon to Use System JDK**

- **Edit Katalon’s Configuration File** :
  - Locate the Katalon startup script (`katalon.ini` or `katalon.vmoptions`).
  - Add the following line to explicitly set `java.home`:

```auto
-Djava.home=/path/to/your/jdk-17.x.x/Contents/Home

```

- Example for macOS:

```auto
-Djava.home=/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home

```

* * *

## **3. Reinstall Appium with Java 17 Compatibility**

- **Uninstall Appium 1.18.1** :

bash

```auto
npm uninstall -g appium@1.18.1

```

- **Install Appium 2.x** (recommended for Java 17 support):

bash

```auto
npm install -g appium@next

```

- Use Appium’s `--allow-insecure` flag if necessary.

* * *

## **4. Update Environment Variables**

- **Set `JAVA_HOME` Globally** :
  - For macOS/Linux:

bash

```auto
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
echo 'export JAVA_HOME=$(/usr/libexec/java_home -v 17)' >> ~/.zshrc # or ~/.bash_profile

```

- For Windows:
  - Set `JAVA_HOME` in **System Properties \> Environment Variables**.

* * *

## **5. Launch Katalon from Terminal**

- Ensure Katalon inherits the correct `JAVA_HOME`:

bash

```auto
# macOS
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.x.x/Contents/Home
open -a "Katalon Studio"

# Windows
set JAVA_HOME=C:\Program Files\Java\jdk-17.x.x
start "Katalon Studio"

```

* * *

## **6. Check for Conflicting Java Versions**

- List installed JDKs:

bash

```auto
/usr/libexec/java_home -V # macOS

```

- Uninstall older JDKs (e.g., Java 8) if not needed.

* * *

## **7. Verify Appium Server Configuration**

- Start Appium manually to debug:

bash

```auto
appium --log-level debug

```

- Look for Java-related errors in the logs.

* * *

## **8. Final Fix for Embedded JRE Fallback**

If Katalon still uses its embedded JRE:

- **Symlink Your JDK to Katalon’s Expected Path** (macOS):

bash

```auto
sudo ln -s /Library/Java/JavaVirtualMachines/jdk-17.x.x/Contents/Home /Applications/Katalon\ Studio.app/Contents/Eclipse/jre

```

- **Caution** : This overwrites Katalon’s internal JRE. Backup first.

* * *

## **Troubleshooting Checklist**

| Issue | Solution |
| --- | --- |
| Incorrect `JAVA_HOME` in Katalon | Recheck Preferences \> Java \> Installed JREs |
| Appium compatibility | Use Appium 2.x or downgrade to Java 11/8 |
| Environment variables not loaded | Launch Katalon from terminal |
| Conflicting JDKs | Uninstall old JDKs and update `JAVA_HOME` |

---

<div class="post-metadata">

**Author:** ![suyashabob41](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/suyashabob41/32/30227_2.png) [@suyashabob41](https://forum.katalon.com/u/suyashabob41)\
**Post date:** [June 5, 2025, 2:58am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/3 "2025-06-05T02:58:18Z")

</div>

Hi Dineshh,

Thanks for such a detailed post reply! I appreciate your help.

I tried following all these steps, yet I still face the same error. I upgraded appium’s version to 2.19.0, but then it wont even start the recorder saying “Failed to start Appium server in 60 seconds”.

Symlinking didnt help too ☹

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [June 5, 2025, 4:50am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/4 "2025-06-05T04:50:57Z")

</div>

Hi @suyashabob41,

Thank you for sharing your issue. You can find the workaround for the problem

> [@suyashabob41](#):
>
> Failed to start Appium server in 60 seconds”.

here: [https://katalon-inc.my.site.com/support/article/Troubleshooting-Fail-to-start-Appium-server-in-60-seconds](https://katalon-inc.my.site.com/support/article/Troubleshooting-Fail-to-start-Appium-server-in-60-seconds). Otherwise, which KS version are you using? If it is not the latest, please help upgrade it because we handle with Appium 2x with newer version. Thank you

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [June 5, 2025, 5:42am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/5 "2025-06-05T05:42:29Z")

</div>

can you share full error trace along with katalon version, OS, jdk etc

---

<div class="post-metadata">

**Author:** ![suyashabob41](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/suyashabob41/32/30227_2.png) [@suyashabob41](https://forum.katalon.com/u/suyashabob41)\
**Post date:** [June 6, 2025, 1:51am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/6 "2025-06-06T01:51:27Z")

</div>

Hi @Elly_Tran,

Thanks your reply!

I am using Katalon version 10.2.1. I tried following all steps from the troubleshooting guide, but still face the same error ☹

---

<div class="post-metadata">

**Author:** ![suyashabob41](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/suyashabob41/32/30227_2.png) [@suyashabob41](https://forum.katalon.com/u/suyashabob41)\
**Post date:** [June 6, 2025, 1:51am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/7 "2025-06-06T01:51:36Z")

</div>

Hi @dineshh,

Thanks for checking in with me again. Below is the error trace I received. The KS version I am using is the latest one 10.2.1 and I am on macOS Monterey using JDK 17.

```auto
java.util.concurrent.ExecutionException: com.kms.katalon.core.appium.exception.AppiumStartException: Fail to start Appium server in 60 seconds
	at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:49)
	at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite$12.run(MobileLocalAppComposite.java:491)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:124)
Caused by: com.kms.katalon.core.appium.exception.AppiumStartException: Fail to start Appium server in 60 seconds
	at com.kms.katalon.core.appium.driver.AppiumDriverManager.startAppiumServerJS(AppiumDriverManager.java:281)
	at com.kms.katalon.composer.mobile.objectspy.dialog.MobileInspectorController.startMobileApp(MobileInspectorController.java:205)
	at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite.startLocalAppAsNormal(MobileLocalAppComposite.java:564)
	at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite.smartStartAndroidApp(MobileLocalAppComposite.java:548)
	at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite.smartStartApp(MobileLocalAppComposite.java:526)
	at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite$12$1.call(MobileLocalAppComposite.java:497)
	at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.startThreadAndWait(ProgressMonitorDialogWithThread.java:36)
	at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:48)
	... 2 more

```

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [June 6, 2025, 7:22am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/8 "2025-06-06T07:22:29Z")

</div>

is this happening only in 10.2.1 version? can you downgrade to lower version and confirm

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [June 6, 2025, 8:18am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/9 "2025-06-06T08:18:40Z")

</div>

> [@suyashabob41](#):
>
> Verified the correct JDK path is set in **Katalon \> Preferences \> Java \> Installed JREs** (set my actual JDK 17 install as default).

How about trying NOT to set custom JRE path so that you use the Katalon-bundled JDK17? — it may pass; then you should raise a bug report to Katalon.

---

<div class="post-metadata">

**Author:** ![suyashabob41](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/suyashabob41/32/30227_2.png) [@suyashabob41](https://forum.katalon.com/u/suyashabob41)\
**Post date:** [June 7, 2025, 4:09am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/10 "2025-06-07T04:09:15Z")

</div>

I did the symlinking again. It doesnt show the JAVA\_HOME error now. So, thats solved!

I just had to modify the path a bit. Thanks for all the helpful pointers provided for this issue.

---

<div class="post-metadata">

**Author:** ![suyashabob41](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/suyashabob41/32/30227_2.png) [@suyashabob41](https://forum.katalon.com/u/suyashabob41)\
**Post date:** [June 7, 2025, 4:09am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/11 "2025-06-07T04:09:23Z")

</div>

Hi @kazurayam,

Thanks for the reply!

I did try that, however it did not help as the path it was pointing to didnt exist. Creating a sym link my preferred JDK path helped.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [June 7, 2025, 9:26am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/12 "2025-06-07T09:26:57Z")

</div>

> [@suyashabob41](#):
>
> I did try that, however it did not help as the path it was pointing to didnt exist.

What did you do actually?

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [June 8, 2025, 6:49am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/13 "2025-06-08T06:49:39Z")

</div>

your issue resolved?

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [June 9, 2025, 11:39pm UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/14 "2025-06-09T23:39:14Z")

</div>

> [@suyashabob41](#):
>
> Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: The JAVA\_HOME location ‘/Applications/Katalon Studio Enterprise.app/Contents/Eclipse/jre/Contents/’ must exist

In the error message, I see the path

`'/Applications/Katalon Studio Enterprise.app/Contents/Eclipse/jre/Contents/’`

This path is simply wrong. You should correct it.

I checked my Katalon Studio installed on my mac:

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/4/8/4866a964368ab30ed0b68b249f21b73dd6859a6c.png)

Here I see the path

`/Applications/Katalon Studio Enterprise.app/Contents/Eclipse/jre`

which is right, does exist.

---

<div class="post-metadata">

**Author:** ![suyashabob41](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/suyashabob41/32/30227_2.png) [@suyashabob41](https://forum.katalon.com/u/suyashabob41)\
**Post date:** [June 10, 2025, 2:48am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/15 "2025-06-10T02:48:01Z")

</div>

I created a sym link between the two directories as @dineshh mentioned

---

<div class="post-metadata">

**Author:** ![suyashabob41](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/suyashabob41/32/30227_2.png) [@suyashabob41](https://forum.katalon.com/u/suyashabob41)\
**Post date:** [June 10, 2025, 2:48am UTC](https://forum.katalon.com/t/java-home-location-must-exist/175341/16 "2025-06-10T02:48:10Z")

</div>

Yes, it did using the symlink approach you mentioned.
