Create an account

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fedora - Java development on Fedora Linux

Java development on Fedora Linux

Java is a lot. Aside from being an island of Indonesia, it is a large software development ecosystem. Java was released in January 1996. It is approaching its 25th birthday and it’s still a popular platform for enterprise and casual software development. Many things, from banking to Minecraft, are powered by Java development.

This article will guide you through all the individual components that make Java and how they interact. This article will also cover how Java is integrated in Fedora Linux and how you can manage different versions. Finally, a small demonstration using the game Shattered Pixel Dungeon is provided.

A birds-eye perspective of Java

The following subsections present a quick recap of a few important parts of the Java ecosystem.

The Java language

Java is a strongly typed, object oriented, programming language. Its principle designer is James Gosling who worked at Sun, and Java was officially announced in 1995. Java’s design is strongly inspired by C and C++, but using a more streamlined syntax. Pointers are not present and parameters are passed-by-value. Integers and floats no longer have signed and unsigned variants, and more complex objects like Strings are part of the base definition.

But that was 1995, and the language has seen its ups and downs in development. Between 2006 and 2014, no major releases were made, which led to stagnation and which opened up the market to competition. There are now multiple competing Java-esk languages like Scala, Clojure and Kotlin. A large part of ‘Java’ programming nowadays uses one of these alternative language specifications which focus on functional programming or cross-compilation.

// Java
public class Hello { public static void main(String[] args) { println("Hello, world!"); }
} // Scala
object Hello { def main(args: Array[String]) = { println("Hello, world!") }
} // Clojure
(defn -main [& args] (println "Hello, world!")) // Kotlin
fun main(args: Array<String>) { println("Hello, world!")

The choice is now yours. You can choose to use a modern version or you can opt for one of the alternative languages if they suit your style or business better.

The Java platform

Java isn’t just a language. It is also a virtual machine to run the language. It’s a C/C++ based application that takes the code, and executes it on the actual hardware. Aside from that, the platform is also a set of standard libraries which are included with the Java Virtual Machine (JVM) and which are written in the same language. These libraries contain logic for things like collections and linked lists, date-times, and security.

And the ecosystem doesn’t stop there. There are also software repositories like Maven and Clojars which contain a considerable amount of usable third-party libraries. There are also special libraries aimed at certain languages, providing extra benefits when used together. Additionally, tools like Apache Maven, Sbt and Gradle allow you to compile, bundle and distribute the application you write. What is important is that this platform works with other languages. You can write your code in Scala and have it run side-by-side with Java code on the same platform.

Last but not least, there is a special link between the Java platform and the Android world. You can compile Java and Kotlin for the Android platform to get additional libraries and tools to work with.

License history

Since 2006, the Java platform is licensed under the GPL 2.0 with a classpath-exception. This means that everybody can build their own Java platform; tools and libraries included. This makes the ecosystem very competitive. There are many competing tools for building, distribution, and development.

Sun ‒ the original maintainer of Java ‒ was bought by Oracle in 2009. In 2017, Oracle changed the license terms of the Java package. This prompted multiple reputable software suppliers to create their own Java packaging chain. Red Hat, IBM, Amazon and SAP now have their own Java packages. They use the OpenJDK trademark to distinguish their offering from Oracle’s version.

It deserves special mention that the Java platform package provided by Oracle is not FLOSS. There are strict license restrictions to Oracle’s Java-trademarked platform. For the remainder of this article, Java refers to the FLOSS edition ‒ OpenJDK.

Finally, the classpath-exception deserves special mention. While the license is GPL 2.0, the classpath-exception allows you to write proprietary software using Java as long as you don’t change the platform itself. This puts the license somewhere in between the GPL 2.0 and the LGPL and it makes Java very suitable for enterprises and commercial activities.


If all of that seems quite a lot to take in, don’t panic. It’s 25 years of software history and there is a lot of competition. The following subsections demonstrate using Java on Fedora Linux.

Running Java locally

The default Fedora Workstation 33 installation includes OpenJDK 11. The open source code of the platform is bundled for Fedora Workstation by the Fedora Project’s package maintainers. To see for yourself, you can run the following:

$ java -version

Multiple versions of OpenJDK are available in Fedora Linux’s default repositories. They can be installed concurrently. Use the alternatives command to select which installed version of OpenJDK should be used by default.

$ dnf search openjdk
$ alternatives --config java

Also, if you have Podman installed, you can find most OpenJDK options by searching for them.

$ podman search openjdk

There are many options to run Java, both natively and in containers. Many other Linux distributions also come with OpenJDK out of the box. has a comprehensive list. GNOME Boxes or Virt Manager will be your friend in that case.

To get involved with the Fedora community directly, see their project Wiki.

Alternative configurations

If the Java version you want is not available in the repositories, use SDKMAN to install Java in your home directory. It also allows you to switch between multiple installed versions and it comes with popular CLI tools like Ant, Maven, Gradle and Sbt.

Last but not least, some vendors provide direct downloads for Java. Special mention goes to AdoptOpenJDK which is a collaborative effort among several major vendors to provide simple FLOSS packages and binaries.

Graphical tools

Several integrated development environments (IDEs) are available for Java. Some of the more popular IDEs include:

  • Eclipse: This is free software published and maintained by the Eclipse Foundation. Install it directly from the Fedora Project’s repositories or from Flathub.
  • NetBeans: This is free software published and maintained by the Apache foundation. Install it from their site or from Flathub.
  • IntelliJ IDEA: This is proprietary software but it comes with a gratis community version. It is published by Jet Beans. Install it from their site or from Flathub.

The above tools are themselves written in OpenJDK. They are examples of dogfooding.


The following demonstration uses Shattered Pixel Dungeon ‒ a Java based roque-like which is available on Android, Flathub and others.

First, set up a development environment:

$ curl -s "" | bash
$ source "$HOME/.sdkman/bin/"
$ sdk install gradle

Next, close your terminal window and open a new terminal window. Then run the following commands in the new window:

$ git clone
$ cd shattered-pixel-dungeon
$ gradle desktop:debug
The title screen of the Java application Shattered Pixel Dungeon

Now, import the project in Eclipse. If Eclipse is not already installed, run the following command to install it:

$ sudo dnf install eclipe-jdt

Use Import Projects from File System to add the code of Shattered Pixel Dungeon.

Editing a Java application using the Eclipse IDE

As you can see in the imported resources on the top left, not only do you have the code of the project to look at, but you also have the OpenJDK available with all its resources and libraries.

If this motivates you further, I would like to point you towards the official documentation from Shattered Pixel Dungeon. The Shattered Pixel Dungeon build system relies on Gradle which is an optional extra that you will have to configure manually in Eclipse. If you want to make an Android build, you will have to use Android Studio. Android Studio is a gratis, Google-branded version of IntelliJ IDEA.


Developing with OpenJDK on Fedora Linux is a breeze. Fedora Linux provides some of the most powerful development tools available. Use Podman or Virt-Manager to easily and securely host server applications. OpenJDK provides a FLOSS means of creating applications that puts you in control of all the application’s components.

Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Fedora - Contribute at the Fedora Audio, Kernel 5.11 and i18n test days xSicKxBot 0 6 02-26-2021, 01:09 PM
Last Post: xSicKxBot
  Fedora - Installing Nextcloud 20 on Fedora Linux with Podman xSicKxBot 0 29 02-16-2021, 07:51 AM
Last Post: xSicKxBot
  Fedora - Network address translation part 2 – the conntrack tool xSicKxBot 0 20 02-13-2021, 12:41 PM
Last Post: xSicKxBot
  Fedora - Fedora Aarch64 on the SolidRun HoneyComb LX2K xSicKxBot 0 30 02-09-2021, 08:05 AM
Last Post: xSicKxBot
  Fedora - Astrophotography with Fedora Astronomy Lab: setting up xSicKxBot 0 34 02-06-2021, 04:07 AM
Last Post: xSicKxBot
  Fedora - Join Fedora at FOSDEM 2021 xSicKxBot 0 39 02-02-2021, 08:23 AM
Last Post: xSicKxBot
  Fedora - Manage containers with Podman Compose xSicKxBot 0 43 01-30-2021, 09:07 AM
Last Post: xSicKxBot
  Fedora - Introduction to Thunderbird mail filters xSicKxBot 0 31 01-28-2021, 08:56 AM
Last Post: xSicKxBot
  Fedora - Convert your filesystem to Btrfs xSicKxBot 0 40 01-23-2021, 05:55 AM
Last Post: xSicKxBot
  Fedora - Deploy your own Matrix server on Fedora CoreOS xSicKxBot 0 47 01-21-2021, 05:40 AM
Last Post: xSicKxBot

Forum Jump:

Active Threads
(Indie Deal) Freebie Round-up, Blood Bow...
Last Post: xSicKxBot
Yesterday 09:57 PM
» Replies: 0
» Views: 3
Mobile - Warhammer: Odyssey is not mobil...
Last Post: xSicKxBot
Yesterday 06:19 PM
» Replies: 0
» Views: 3
News - Twitch Removes Amazon's Anti-Unio...
Last Post: xSicKxBot
Yesterday 06:18 PM
» Replies: 0
» Views: 10
[Tut] Python memoryview() — Tame That St...
Last Post: xSicKxBot
Yesterday 09:36 AM
» Replies: 0
» Views: 1
(Indie Deal) Imperator Rome, Surviving M...
Last Post: xSicKxBot
Yesterday 09:36 AM
» Replies: 0
» Views: 1
DaVinci Resolve 17 Released
Last Post: xSicKxBot
Yesterday 09:36 AM
» Replies: 0
» Views: 2
AppleInsider - Apple says Developer Tran...
Last Post: xSicKxBot
Yesterday 09:36 AM
» Replies: 0
» Views: 1
Microsoft - People of Microsoft: Corneli...
Last Post: xSicKxBot
Yesterday 09:36 AM
» Replies: 0
» Views: 1
News - Superman Reboot Movie Is Coming F...
Last Post: xSicKxBot
Yesterday 09:35 AM
» Replies: 0
» Views: 21
Hot to get Unbanned From Origin (Battlef...
Last Post: trioxyn
Yesterday 05:04 AM
» Replies: 1
» Views: 1679


Get the Deal of the Week at

Copyright © 2012-2020