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

14 vues (au cours des 30 derniers jours)
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?

Réponse acceptée

John Goulet
John Goulet le 19 Fév 2024
Déplacé(e) : Walter Roberson le 19 Fév 2024
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

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by