Using 2018b javaclasspath.txt doesn't seem to get loaded during batch startup.

9 ビュー (過去 30 日間)
I am trying to run matlab 2018b in batch mode under windows using the task scheduler. The command options are:
-useStartupFolderPref -nosplash -minimize -r my_script_file
I have a javaclasspath.txt file in my startup folder. my_script_file works when matlab is launched by double clicking the icon. During the batch mode startup, the java class path does not include the contents of my javaclasspath.txt file - it does when matlab is started by double click.
Am I doing something wrong?

採用された回答

Andrew Stamps
Andrew Stamps 2019 年 4 月 4 日
Have you attempted putting your javaclasspath.txt file in your preferences directory instead of your startup directory? The preferences directory can be found by executing the following command:
prefdir
  1 件のコメント
Anthony Whipple
Anthony Whipple 2019 年 4 月 5 日
Thanks! I am pretty sure that it used to work in the startup directory, but this does the trick.

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

その他の回答 (1 件)

Yair Altman
Yair Altman 2019 年 2 月 11 日
I'm not sure why your javaclasspath.txt file doesn't load in batch mode. As workaround, you can programmatically load the necessary Java classes into the static Java classpath inside your script file, as described in https://undocumentedmatlab.com/blog/static-java-classpath-hacks

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by