java.opt file adding -D parameters

2 ビュー (過去 30 日間)
Bill
Bill 2013 年 2 月 19 日
Matlab version R2012a Linux
So I want to be able to add various jVM "-D" parameters to the "java.opt" file so that when matlab starts up the JVM these are passed in and accessible with the System.getProperty() function. I want students to be able to pass in things like the IP address of a database server, etc. etc. to the various java classes called.
I have looked high and low and there seems to be no definitive answer to this.
I have tried:
java.opt in the working directory. java.opt in the %MATLABROOT/bin/[ARCH] directory.
and neither seem to work. Am I approaching this wrong or ??
Little help would be appreciated.
  1 件のコメント
Raymond Norris
Raymond Norris 2013 年 2 月 20 日
That's odd. With R2012b on Windows 7, I've defined java.opts as such:
-DRunTime=12hrs
and placed it in $matlab/bin/$arch. Then in MATLAB, I run:
>> java.lang.System.getProperty('RunTime')
ans =
12hrs
>>

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

回答 (0 件)

カテゴリ

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