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

12 ビュー (過去 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 Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by