| Contents | Index |
| On this page… |
|---|
Set Java system properties in one of two ways:
In the Java statement. Use the syntax: java -Dpropertyname=value, where propertyname is the name of the Java system property you want to set and value is the value to which you want the property set.
In the Java code. Insert the following statement in your Java code near the top of the main function, before you initialize any Java components:
System.setProperty(key,value)
key is the name of the Java system property you want to set, and value is the value to which you want the property set.
After developing your initial GUI using the MATLAB Builder JA product, subsequent GUIs that you develop may inherit properties of the MATLAB GUI, rather than properties of your initial design. To preserve your original look and feel, set the mathworks.DisableSetLookAndFeel Java system property to true.
The following are examples of how to set mathworks.DisableSetLookAndFeel using the techniques in How to Set Java System Properties:
In the Java statement:
java -classpath X:/mypath/tomy/javabuilder.jar -Dmathworks.DisableSetLookAndFeel=true
In the Java code:
Class A {
main () {
System.getProperties().set("mathworks.DisableSetLookAndFeel","true");
foo f = newFoo();
}
} ![]() | Handling Data Conversion Between Java and MATLAB | Blocking Execution of a Console Application that Creates Figures | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |