Main page > Java > Image FAQ

Java graphics without X server

<< Previous question: Image example Code

Next question: Determine image width and height >>

A frequently asked question in the context of loading images with Java—or, more broadly, doing any image manipulation with Java's built-in classes—is that of the missing X server. Unix users who just want to load an image via the AWT without displaying it get an error message if there is no X server installed (which is true for many server systems). In fact, by default the X server is required for that. Here are some tips on how to solve that problem:

Note that Java Advanced Imaging does not need an X server for loading GIFs and JPEGs since version 1.1.1.

Davisor Ltd. who offer a commercial Java chart library also have some tips related to this problem.