javaclasspath hangs in MATLAB 2025b

19 ビュー (過去 30 日間)
Titas Bucelis
Titas Bucelis 2025 年 10 月 9 日 21:43
コメント済み: Titas Bucelis 2025 年 10 月 13 日 15:59

Hi,

I've recently started using MATLAB 2025b (after using 2022b for a while), however, I sometimes get the whole app (sort of like a deadlock somewhere) hangs when calling:
javaclasspath('-dynamic')

It doesn't happen every time, but happens often enough to be an issue. I use this as part of an initialisation script to check if .jar file has been added already to not do it again (not sure what my reason was for setting it up that way - either for performance or to avoid warnings):
java_paths = javaclasspath('-dynamic');
if ~ischar(filepath) || ~ismember(filepath, java_paths)
javaaddpath(filepath, varargin{:});
end

Here's an error I get (it's not an actual error cause I have to cancel it in the end), but shows where it gets "stuck":
Operation terminated by user during javaclasspath

In javaclasspath

In javaaddpathNoWarn (line 5)
java_paths = javaclasspath('-dynamic');
^^^^^^^^^^^^^^^^^^^^^^^^^
In
initSnakeYaml (line 3)
javaaddpathNoWarn(snakeYamlFile);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In
yaml.load (line 43)
initSnakeYaml
^^^^^^^^^^^^^
In
yaml.loadFile (line 43)
result = yaml.load(content, bConvertToArray);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In
LoadYaml (line 2)
data = yaml.loadFile(filename);
^^^^^^^^^^^^^^^^^^^^^^^

Has anyone seen this issue or have a solution for it? I have never had it in MATLAB 2022b.

  1 件のコメント
Titas Bucelis
Titas Bucelis 2025 年 10 月 13 日 15:59
Also get the issue if I just use javaaddpath which calls javaclasspath
Operation terminated by user during javaclasspath
In javaclasspath
In javaaddpath (line 71)
javaclasspath( p, javaclasspath );
^^^^^^^^^^^^^
In javaaddpathNoWarnNoCheck (line 5)
javaaddpath(filepath, varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In yaml.initSnakeYaml (line 5)
javaaddpathNoWarnNoCheck(snakeYamlFile);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

製品


リリース

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by