Class Launcher

java.lang.Object
dev.zemco.codegame.Launcher

public final class Launcher extends Object
Entrypoint for fat jar deployed version of CodeGame.

While recommended approach for packaging Java applications as of Java 9 is using the module system and tool called jlink, this approach doesn't support linking against automatically generated modules. Currently, this application depends on library called RichTextFX for styleable editable text area used for coding. At this moment, developers of this dependency provide only versions containing automatic modules, which makes the recommended approach not usable by us.

As a workaround, we use Maven shade plugin for building the fat jar. This however introduces another issue, where JavaFX checks if the javafx.graphics module is present when used main function is defined in a class that extends Application. To circumvent this issue, this class was created to launch the application when launching from a fat jar.

Author:
Erik Zemčík
See Also:
  • Method Details

    • main

      public static void main(String[] args)
      Entrypoint for CodeGame when launched from fat jar.
      Parameters:
      args - arguments passed to CodeGame application during launch