필터 지우기
필터 지우기

"jenv system" does not work on Mac (MacOS Ventura 13.4)

조회 수: 6 (최근 30일)
Sunham Kim
Sunham Kim 2023년 5월 29일
답변: Chetan 2023년 8월 31일
I am trying to run Matlab with openJDK and found that "jenv system" is not working. It yields the following error:
Unable to locate Java "system" version
Download and install a supported version of Java. For more information
https://www.mathworks.com/support/requirements/language-interfaces.html
My openJDK is properly installed. I checked jenv documentation (https://www.mathworks.com/help/matlab/ref/jenv.html) and found:
macOS platforms — The function selects the supported Java version based on one of these macOS java_home scripts:
  • /usr/libexec/java_home -f -v 1.8
  • /usr/libexec/java_home -f -v 1.11
It is known that
/usr/libexec/java_home -f -v
is no longer working, at least on recent macOS releases. (e.g. https://sebastien.andrivet.com/fr/posts/jd-gui-macos/) Because Apple changes its behavior time to time.
If Matlab still relies on such outdated java_home script, it should be sorted out.
* I know the jre can be manually copied inside Matlab package. I wanted to figure out why the command does not work.

채택된 답변

Chetan
Chetan 2023년 8월 31일
This issue has been fixed in the R2022a update 2. Therefore, you can update to R2022 to resolve this issue. You can refer to this bug report for more details:
Hope it helps!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by