I'm working on a CentOS 6.3 x86_64 minimal OS (installed using the netinstall ISO).

This system is not expected to run anything beyond console apps/services and Tomcat7. When I attempt to install OpenJDK 1.7, it lists some x11 packages as dependencies. For my purpose, not even awt is needed. And therefore, if possible, I would like to avoid installing all the fonts, x11, etc.

Does there exist a Java/JRE version that comes without the UI pieces?

  • I believe Java installs as a whole package, removing classes can get you troubles, besides, it only take you ~250 MB – daisy Apr 3 '13 at 9:07
  • I'm afraid there's no such compact version. Some web applications still need fonts to render a bitmap picture and display it to end user. If you don't like those dependencies, maybe you can try the JDK shipped by Oracle. – LiuYan 刘研 Apr 3 '13 at 9:30

I don't know CentOS, but usually their is an OpenJDK -headless package in distributions that doesn't include GUI components, and normally no dependencies to X11 packages.

For instance debian provide one package and ArchLinux too. If your distribution doesn't include it, you can maybe have a look at these to see how it is build.

  • Thanks @StreakyCobra. Looks like CentOS does not know of one yet. I'll mark your response as the answer. – Parag Doke May 3 '13 at 3:39
  • There is a similar question on SuperUser where we are looking for a solution (in the comments), but without results for the moment. – StreakyCobra May 3 '13 at 7:49

You could remake the package from the source package and split the x11 deps into another package, it's just not a "A+" package, more like a "B-". I assume this is only because you don't wish to install all the x11 libs it depends on?

Alternatively, you could simply use the provided tarball instead of the rpm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.