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 Printing
Java Virtual Machine
PrinterJob.setPrintService issues
The PrinterJob.setPrintService
method does not reset the print service attached to the PrinterJob
and does not throw an exception. When called, PrinterJob.setPrintService
fails and printing to the selected printer fails as well.
To print a Printable
and retarget it to different PrintServices
, create a new DocPrintJob
from the desired PrintService
and use its print
method. This may require creating an intermediate PagableDoc
, Book
, and appending your Printable
using the default page from the DocPrintJob
.
The -server option always regenerates the Java Shared Archive
Using the java
command with the -server
option on a PowerPC-based Mac regenerates the Java Shared Archive every time the command is issued. This issue only affects Java startup time and does not hinder a Java application’s performance.
Use the -Xshare:off
option or explicitly choose -client
when running the java
command.
On Mac OS X Server, the -server
option is the default, so the shared archive is always regenerated unless you explicitly use the -client
option.
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-03-08)