1

I have a Java application I am developing and I would like to use Ubuntu to work on it at home. The application displays some images and allows a user to pan and view. The same application runs smoothly on a lower spec Windows machine at work.

When I tested it on my much more powerful Ubuntu laptop the graphics are slow and jumpy. I played around with different versions of Java until I found the trick to add the argument

-Dsun.java2d.pmoffscreen

and this has fixed it. Could someone explain why this works and what is going on?

1 Answer 1

1

that's a bit weird because this should be enabled by default.. are you using oracle-jdk or open-jdk on your linux machine?

if pmoffscreen is enabled then your 2d engine uses X11 pixmaps for storing or caching certain types of offscreen images.. This usually speeds up your performance for 'basic' image processing..

however, if you would do stuff like antialiasing, alpha compositing or whatsoever than you should disable pmoffscreen because such things are handled way more efficient by the build in software renderer.

best, chris

1
  • I've switched to Oracle but had the same issue with OpenJDK Nov 12, 2012 at 1:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .