javaclasspath.txt in Matlab online

5 ビュー (過去 30 日間)
Jeff Mandel
Jeff Mandel 2020 年 5 月 11 日
コメント済み: Jeff Mandel 2020 年 5 月 28 日
I'm trying to add a jar to my static path in Matalb Online 2020a. I have the jar in the root of /MATLAB Drive. I have tried creating the file by
edit(fullfile(userpath,'javaclasspath.txt'))
and
edit(fullfile(prefsdir,'javaclasspath.txt'))
Neither seems to get loaded when I exit and start a new session. Suggestions?

回答 (1 件)

Rajani Mishra
Rajani Mishra 2020 年 5 月 28 日
There can be possibly two reasons for you not be able to see changes
1. File is not saved in the right location :- Save the javaclasspath.txt file in the startup folder or in the preferences folder. Type "pwd" at the command line for identifying the startup folder, and use "prefdir" for preferences folder
2. File is not being saved after the changes made :- After editing make sure the file is saved with all the changes, verify it by checking in that location
  1 件のコメント
Jeff Mandel
Jeff Mandel 2020 年 5 月 28 日
It should be evident from how I created the files, but:
>> type(fullfile(userpath,"javaclasspath.txt"))
'/MATLAB Drive/postgresql-42.2.12.jar'
>> type(fullfile(prefdir,"javaclasspath.txt"))
'/MATLAB Drive/postgresql-42.2.12.jar'
Note that I have enclosed the path in single quotes due to the space in MATLAB Drive. I don't suppose you tried this yourself before responding?

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by