I am running a Java application (JRE 1.8.0_20) on a x86 system (Linux Kernel 3.13.0-35-generic) that has as main display an USB LCD that has a framebuffer driver. It stores the pixel data in BGR (565) order (according to the LCD manufacturer). All applications seems to display the colors right but those that runs on JVM, that are swapping red and blue colors (see images below).


At the left there is a simple Java app showing a jpg. If the same image openned from Firefox, it shows the right colors. Note also that the Java cup is rendered with the proper colors.
So I modified the driver source code to swap red and blue, hoping that this way, Java apps were shown ok. Oddly enough, Java apps still shown as if no change was made on the dirvers (all other apps did reflect the color swap).

After swapping red and blue at a driver level, all aplications reflect a change, but but not the Java apps.
So at this point I need some help from the community:
- Can I "tell" the JVM the color order it should use to draw its UI to the Framebuffer?
- Is there another walk around. I am afraid that if I have to manipulate all the images in the Java app to correct this problem, it would have a negative impact on the performance.
Thanks ofr reading and best regards.