Why are exported JPEG diagrams empty on Solaris and Linux platforms?

When a model diagram is exported to JPEG file on the Solaris and Linux platforms, the file size is zero byte or diagram is blank. This is a bug in JDK when the color depth is greater than 16-bit which can be referenced to the JDK issue 4908153.

Here are a few workarounds.

Workaround #1:

Export the diagram to JPEG format with "Current Zoom Level" and "Visible Window Only" options.

Workaround #2:

Export the diagram to PNG or SVG format.

Workaround #3:

1) Locate your Netbeans installation directory ($install_dir). This can be found by starting up NetBeans and selecting Help -> About then select the Detail tab.
2) Edit the $install_dir/etc/netbeans.conf file.
3) Find the line defining netbeans_default_options.
4) Add JVM flag "-J-Dsun.java2d.pmoffscreen=false" to netbeans_default_options.

Workaround #4:

Change the color depth on your display to 16-bit.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo