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

3 次查看(过去 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 中查找有关 Environment and Settings 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by