Unable to install MATLAB Support Package for Apple iOS Sensors

While trying to install the iPhone and iPad sensor support package I get the following error:
When I run version -java I get:
>> version -java
ans =
'Java is not loaded'
Has anyone encountered this?

Answers (1)

I understand that you are encountering an error indicating "Java is not loaded" when running "version -java" in MATLAB R2025b. This typically occurs when MATLAB starts without the Java Virtual Machine (JVM) initialized, which is required for many features including hardware support package installation.
To resolve this issue you can try the following steps:
First, restart MATLAB and verify whether Java is loaded by running this command:
usejava('jvm')
If this returns 0 (false), Java is not loaded. Ensure that you are not starting MATLAB with the "-nojvm" flag in your startup options or shortcuts.
Next, try using the "jenv" factory command to configure MATLAB to use the version of Java included with the installation:
jenv factory
This command resets MATLAB to use its bundled Java environment, which should resolve most Java loading issues.
If the "jenv" factory command does not resolve the issue, you can manually enable Java in MATLAB R2025a and newer versions by referring to this MATLAB Answer:
For changing the Java Virtual Machine that MATLAB uses on Windows, please refer to:
To configure the Java path for MATLAB, MATLAB Runtime, and deployed applications, refer to:
If you need to install a compatible version of Java separately, you can find the supported OpenJDK versions here:
Additionally, please verify that MATLAB was not installed without the default JRE. You can check this by referring to:
If none of these steps resolve the issue, reinstalling MATLAB with the default Java environment is recommended.
If the default java does'nt work, you can try setting up MATLAB with external java environment as mentioned above by installing the compatible version of Java for the MATLAB version that you are using.
I hope this helps!

Categories

Asked:

on 1 Apr 2026 at 23:16

Answered:

on 7 Apr 2026 at 11:36

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!