Compiling OpenJDK 7 without X11

I am trying to compile OpenJDK 7 on a headless RHEL server. I have no desire to install a bunch of different X-dependencies just to create it.

Is there a way to compile OpenJDK 7 without Swing / AWT support (and therefore without referencing / usr / lib {arch} / X11 during build?

+6
source share
1 answer

I do not think so. AWT and Swing are pretty core Java components. In addition, Java headless mode is achieved using the AWT option ( java.awt.headless=true ). In addition, from Integration with the desktop class -

If the application runs in an environment without a keyboard, mouse, or monitor (a "headless" environment), the getDesktop() method getDesktop() a java.awt.HeadlessException .

So it's not as easy as compiling without X11 in Java. I believe that actual rendering is still done with the X11 libraries (even when working in headless mode).

+2
source

Source: https://habr.com/ru/post/943996/


All Articles