Matlab external diff missing sys/java/j​re/maca64/​jre/bin/ja​va on MATLAB R2023b

조회 수: 14 (최근 30일)
After upgrading to 2023b, the external comparison capability is no longer working on my m1 mac.
  1. Enabled MathWorks source control integration.
  2. Run comparisons.ExternalSCMLink.setup() in the MATLAB command window.
When I attempt to run a comparison using the system terminal:
`git difftool --no-prompt -t mlDiff HEAD origin/master -- path/to/my/file.slx`
Here is the error message:
/Applications/MATLAB_R2023b.app/bin/maca64/diffLinkClient: line 23: /Applications/MATLAB_R2023b.app/sys/java/jre/maca64/jre/bin/java: No such file or directory
fatal: external diff died, stopping at path/to/my/file.slx
If I attempt to cd into `cd /Applications/MATLAB_R2023b.app/sys/java`, it appears that the directory java directory does not exist.
Is there a workaround for this?

채택된 답변

John Goulet
John Goulet 2024년 2월 19일
이동: Walter Roberson 2024년 2월 19일
I found a workaround. You can symlink the java binary used by MATLAB (found by using jenv) to /Applications/MATLAB_R2023b.app/sys/java/jre/maca64/jre/bin/java
1. Get java bin location used by MATLAB
- In a matlab command window, enter `jenv`
- Copy the path of the java binary located in the 'Home' JavaEnvironment listed by `jenv`
2. Navigate to `/Applications/MATLAB_R2023b.app/sys/`
1. Create the subdirectory: `/java/jre/maca64/jre/bin/`
2. `cd /Applications/MATLAB_R2023b.app/sys/java/jre/maca64/jre/bin/`
3. `ln -s /Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/jre/bin/java ./`
3. External diff should work

추가 답변 (0개)

카테고리

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

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by