How can I enable java in MATLAB R2025a and newer?
99 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 27 de Ag. de 2025
Editada: MathWorks Support Team
el 8 de Oct. de 2025
I have installed R2025a and newer but see that java is not enabled. How can I enable it?
Respuesta aceptada
MathWorks Support Team
el 8 de Oct. de 2025
Editada: MathWorks Support Team
el 8 de Oct. de 2025
Since MATLAB's own graphical user interface is no longer Java-based starting in R2025a, but instead utilizes JavaScript and HTML, Java is no longer automatically loaded at startup.
To check if MATLAB can use the version of Java you have installed, you can run an example command like the following:
java.lang.String(" ")
This should output an empty string as a result and enable Java for the current MATLAB instance.
You can then verify that java was enabled by running the following command:
version -java
2 comentarios
Walter Roberson
el 17 de Sept. de 2025
@Giovanni de amici comments,
when I input
java.lang.String(" ")
Matlab responds
Unable to resolve the name 'java.lang.String'.
is this a sign that something else (beside java) is wrong with my R2025a ?
Walter Roberson
el 17 de Sept. de 2025
When I try on R2025a Update 1, on my MacOS Intel system,
java.lang.String(" ")
works, as it does here on MATLAB Answers.
Note that I do not have -nojvm in effect.
Más respuestas (0)
Ver también
Categorías
Más información sobre Call Java from MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!