< Previous PageNext Page > Hide TOC

Runtime System Properties

Java 1.3.1 on Mac OS X version 10.2 supported some user interface related system properties that are no longer supported in Java 1.4.1. This section highlights those properties as well as the new runtime system properties that are supported.

In this section:

Unsupported System Properties
Supported System Properties


Unsupported System Properties

The following system properties were available in Java 1.3.1 but are no longer supported in Java 1.4.1. Some have similar replacements as noted.

com.apple.macos.use-file-dialog-packages

com.apple.macos.useScreenMenuBar

Use apple.laf.useScreenMenuBar.

com.apple.macos.useSmallTabs

com.apple.macosx.AntiAliasedTextOn

Use apple.awt.textantialiasing.

com.apple.mrj.application.growbox.intrudes

Use apple.awt.showGrowBox.

com.apple.mrj.application.live-resize

Supported System Properties

The following system properties are supported in Java 1.4.1 in Mac OS X version 10.2. Most of them accept a Boolean value. If they accept a different string that is noted. You can call them from the command line with the -D flag to java or in your code with System.setProperty. For example, you could set your Swing application to use the Mac OS X menu bar with either

 java -Dapple.laf.useScreenMenuBar="true" yourApplication

or

 System.setProperty("apple.laf.useScreenMenuBar", "true");
Integration with the native application environment
com.apple.mrj.application.apple.menu.about.name

Sets the application name that is displayed in the application menu and in the Dock.

This property take a string of text as an argument. For example, java -Dcom.apple.mrj.application.apple.menu.about.name="Application Name" yourApplication.

apple.laf.useScreenMenuBar

If you are using the Aqua look and feel, this puts Swing menus in the Mac OS X menu bar. Note that JMenuBars in JDialogs are not moved to the Mac OS X menu bar.

The default value is false. Java applications created with Project Builder have this set to true.

apple.awt.showGrowBox

Most native Mac OS X windows have a resize control in the bottom right corner. By default, Java application windows that use the Aqua look and feel have the functionality of this control, but there is no user interface cue that it is there. This flag causes the resize control to be displayed.

The default value is false.

apple.awt.brushMetalLook

This flag allows you to display your main windows with the “textured” Aqua window appearance. This should only be applied to the primary application window, and should not affect supporting windows like dialogs or preference windows.

The default value is false.

Rendering hints
apple.awt.antialiasing

Causes graphic primitives like line, arc, rectangle, and so on to be painted with antialiasing. By default text will also take this setting, though you can override that using apple.awt.textantialiasing. Even with this flag set to true from the command line, you may still set the KEY_ANTIALISING rendering hints for specific objects.

Although this is false by default, it is set to true when you use the Aqua look and feel. This makes the behavior more consistent with the native Mac OS X user interface. Note that even if you set this to false for an application that uses the Aqua look and feel, Aqua user interface elements themselves will still be drawn with antialiasing.

apple.awt.textantialiasing

Sets the KEY_TEXT_ANTIALIASING rendering hint. Although this inherits the same setting as apple.awt.antialiasing, you can override that setting explicitly.

The default value is false unless you are using the Aqua look and feel.

apple.awt.rendering

Determines whether Graphics2D objects prioritize speed or quality. It sets the KEY_RENDERING hint so that it accepts either VALUE_RENDER_SPEED or VALUE_RENDER_QUALITY as an argument.

apple.awt.interpolation

Allows you to set the KEY_INTERPOLATION rendering hint to determine which algorithm is used in image transformations. Options include VALUE_INTERPOLATION_NEAREST_NEIGHBOR, VALUE_INTERPOLATION_BILINEAR, and VALUE_NTERPOLATION_BICUBIC.

apple.awt.fractionalmetrics

Allows you to set the KEY_FRACTIONALMETRICS to use floating point font metrics instead of the default integer metrics. Options include VALUE_FRACTIONALMETRICS_ON andVALUE_FRACTIONALMETRICS_OFF.

Full screen Java
apple.awt.fakefullscreen

This flag causes full screen applications to be displayed in a window. It might be used during development of full screen Java applications.

The default value is false.

apple.awt.fullscreencapturealldisplays

When you have multiple displays, entering full screen mode normally darkens the secondary screen(s). Setting this to false overrides this default behavior and secondary screens are not darkened. This is useful for development purposes like debugging.

The default value is true.

apple.awt.fullscreenhidecursor

Hides the mouse cursor when in full screen mode.

The default value is true.

apple.awt.fullscreenusefade

If you change the screen resolution when entering full screen mode, the screen transitions by fading out of the old resolution and back in with the new resolution. If you do not change screen resolution, you normally do not see this fade effect. This setting enables that fade effect regardless of whether you have changed the screen resolution.

The default value is false.

Window Positioning
apple.awt.window.position.forceSafeCreation

Enforces the creation of new windows on screen. New windows are not created outside of the Desktop where users would not be able to access them.

The default value is false.

apple.awt.window.position.forceSafeProgrammaticPositioning

Prohibits windows from being moved programatically into a position where users are unable to access them. The true setting promotes optimal interaction between the Java environment and the native window server. Setting this to false may result in unpredictable behavior in the windowing environment.

The default value is true.

apple.awt.window.position.forceSafeUserPositioning

Prohibits users from moving windows into a position where they would no longer be able to access them.

The default value is false.



< Previous PageNext Page > Hide TOC


© 2003 Apple Computer, Inc. All Rights Reserved. (Last updated: 2003-06-11)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.