java.opt file adding -D parameters
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Raymond Norris
le 20 Fév 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
>>
Réponses (0)
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!