Matlab/ Simulink JVM not running

2 visualizaciones (últimos 30 días)
tired
tired el 1 de Ag. de 2024
Respondida: Satwik el 2 de Ag. de 2024
Hi everyone,
i am currently working on a model in simulink, that uses FMUs from different sources (see SC1).
As some of the FMUs require JDK (see SC2), i added the JAVA_HOME variable to my env variables.
I currently use jdk-8.0.422.5.
Besides some unit warnings, i do not have any errors when i update the model.
When i start the simulation, the model also simulates just fine. But sadly, when the simulation ends, i get the warning "JVM is not running" and i cannot acces any functions in simulink (e.g the data inspector). The only thing that happens when i press any buttons in simulink, after the simulation has ended, is that i get an "JVM is not running" error in the diagnostic viewer.
So it seems to me, that simulink is in a loop trying to end the simulation, but cannot since JVM is not running.
I hope that someone has an idea of what the issue might be here or how it can be resolved.
I also added a screenshot of the errors i get in Matlab and if there is more information required, please let me know.
Many thanks in advance!
Tom

Respuestas (1)

Satwik
Satwik el 2 de Ag. de 2024
Hi,
I understand you are encountering an issue related to the Java Development Kit (JDK). Whenever you install a new version of the JDK and wish to use it with MATLAB, you need to configure your MATLAB system for that specific version of the JDK. To do this, you can follow these steps:
1) Download and Install OpenJDK: Download and install a supported version of OpenJDK Java from https://adoptium.net.
2) Configure MATLAB to Use OpenJDK:
If OpenJDK is the first Java entry on your system path, configure MATLAB with the following command:
>> jenv("system").
If OpenJDK is not the first entry and is installed in the folder ‘JRE_path’, configure MATLAB with this command:
>> jenv("JRE_path").
3) Restart MATLAB: after configuring the JDK, restart MATLAB to apply the changes.
4) Verify Java Version: verify the version of Java that MATLAB is configured to use with the following command:
>> jenv
For more detailed information, you can refer to the following documentation:
Hope this helps!

Categorías

Más información sobre Configure and View Diagnostics en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by