java.opt file adding -D parameters

2 Ansichten (letzte 30 Tage)
Bill
Bill am 19 Feb. 2013
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 Kommentar
Raymond Norris
Raymond Norris am 20 Feb. 2013
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
>>

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by