This chapter provides a listing of bugs that you may need to work around in your Java code for Mac OS X. Where possible, workarounds are provided.
Window.setAlwaysOnTop is ignored by FileDialog and PrintDialog
Window.setAlwaysOnTop allows for windows to appear above all other windows. However, because FileDialog and PrintDialog use system-defined windows, they do not respect this property.
Use the Swing equivalents of FileDialog and PrintDialog .
Nested Dialogs
Nested modal dialogs don't behave properly if they all use a common parent.
Use the previous modal dialog as the current dialog’s parent.
Xcode Java Projects in J2SE 5.0
The Java projects in Xcode are set up for use with J2SE 1.4.2.
Follow these steps to modify projects for use with J2SE 5.0:
Double click the target to edit and provide /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/javac as the value for the JAVA_COMPILER build setting. Change the Target VM Version and Source
Version in the Java Compiler
Setting to use 1.5.
Double click the executable named java and enter /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java as the Executable Path in the General tab of Executable info.
Double click the executable named appletviewer and enter /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/appletviewer as the Executable Path in the General tab of Executable info.
J2SE 5.0 Reference Documentation
The J2SE 5.0 Reference Documentation is not installed automatically.
Install the latest J2SE 5.0 Developer package, available from http://connect.apple.com.
J2SE 5.0 symbols not visible in Xode Documention window.
After installing the J2SE 5.0 Reference documentation or a documentation update in Xcode, J2SE 5.0 symbols are not present in the Xcode documentation window.
You need to manually run the pbhelpindexer utility in order for J2SE 5.0 symbols to appear in the Xcode Documentation window. First, open MacOSXDeveloper.pbHelpIndexerList, located at:
/Developer/ADC Reference Library/indexes/ |
Replace this path:
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Resources/ |
With this path:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Resources/ |
Finally, run this command in Terminal:
sudo /Developer/Tools/pbhelpindexer |
Java2D OpenGL Pipeline Not Supported
The sun.java2d.opengl package is not supported in J2SE 5.0 Release 1.
None.
Certificates for SSL client authentication and Keychain
J2SE 5.0 Release 1 looks in Keychain for certificates when attempting to establish trust for signed applets and https sessions. It currently does not look in the Keychain for sites that also need client authentication.
Create a keystore at ~/Library/Caches/Java/security/trusted.clientcerts and import certificates for client authentication.
jvmstat Tools Not Supported
Executing the jinfo, jmap, and jstack commands found in /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands results in java.lang.NoClassDefFoundError.
None.
JMX Remote Access Configuration File Missing
Executing J2SE 5.0 applications using the -Dcom.sun.management.jmxremote argument set results in this error:
Error: Config file not found: /System/Library/Frameworks/JavaVM.framework/ Versions/1.5.0/Home/lib/management/management.properties |
None.
'association' Element of 'information' Descriptor Ignored
Java Cache Viewer does not support JNLP applications that have an 'association' element in their 'information' descriptor. The application works as desired, but any declared associations are not registered with LaunchServices when a desktop application is created.
None.
JNLP Application Memory Settings
If a JNLP application specifies a custom memory setting, that setting is not copied into the Java dictionary of the Info.plist when a user creates a desktop application.
Use Property List Editor to add the memory settings to the VMOptions entry of the Java dictionary.
Resaving Desktop Web Start Applications
Launching a double-clickable JNLP application after it's been modified causes the Save dialog to appear again.
Save the double-clickable Web Start application again. Cancelling causes the original double-clickable Web Start application to be deleted.
Last updated: 2005-10-04