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.
Java Application Support
Java AWT
Java Developer
Java Libraries
Java Virtual Machine
EOModeler incompatible with J2SE 5.0
Older versions of the EOModeler application, bundled with WebObjects, are incompatible with J2SE 5.0 Release 4.
EOModeler needs to be forced into using Java 1.4.2. To do this, open its Info.plist
file (located in EOModeler.app/Contents/
) and change its JVMVersion
key to 1.4*
.
Borland JBuilder 2005 incompatible with J2SE 5.0 Release 4
JBuilder 2005 update 4 added Borland's own implementation of the AWT classes based on Java 1.4.2. Concurrently, JBuilder uses a custom launcher that loads the VM using the CurrentJDK
link. Since the VM is running J2SE 5.0 but the actual AWT classes are from Java 1.4.2, an exception is thrown.
This issue is unresolved at this time. Reverting to an older version of JBuilder 2005 is known to work.
OpenBase JDBC and J2SE 5.0
Database transactions with OpenBase fail with strange data mapping errors.
Download the latest J2SE 5.0-compliant OpenBase JDBC driver at http://www.openbase.com.
CFMessagePortCreateLocal error message
When running a second Java process from the command line, the error message CFMessagePortCreateLocal(): failed to name Mach port (java.ServiceProvider)
may be shown.
This error is harmless and can be ignored.
Xcode Java templates don't build and run successfully
Java templates in Xcode compile using the current JDK but use a JVMVersion
key of 1.4*
. This means that after you install J2SE 5.0 Release 4, projects compile with J2SE 5.0 and try to launch using Java 1.4.2.
To work around this issue:
To compile and run with Java 1.4.2: Under Java Compiler Settings for the build target, Set Target VM version and Source Version to 1.4*
To compile and run with J2SE 5.0: Under Pure Java Specific in the project settings, set Target VM Version to 1.5*
or 1.5+
.
Java developer examples compiled for J2SE 5.0
The examples in /Developer/Examples/Java/
are built with the default compiler, which is now J2SE 5.0. If you compile with the default settings, your build results can only be run on machines with J2SE 5.0 installed.
To compile a sample for use on an earlier version of Java, set the "Target VM version" and "Source Version", available under Java Compiler Settings for the build Target, to 1.4*
.
BigDecimal backward compatibility
In J2SE 5.0, BigDecimal.toString
returns a value using scientific notation instead of the value as a string, the standard behavior in Java 1.4.2.
Calling BigDecimal.toPlainString
returns the value as a string.
Non-default Garbage Collection issues
Applications that use the -XX:+UseConcMarkSweepGC
(Concurrent Mark Sweep Garbage Collection algorithm) or -XX:+useParallelGC
(Parallel Garbage Collection algorithm) tend to be unstable.
None.
Java troubleshooting tools non-functional
Java troubleshooting tools, like jinfo
, jmap
, and jstack
, don't work when run as a regular user.
To use these tools, prepend them using the sudo
command. You need to kill the hsdbd
process before using any of these commands with sudo.
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-05-23)