How to use JRebirth Application Framework
This page will help you setting up your project to work with JRebirth.

Installation

Manual Download

JRebirth is composed by a set of jar files; add them to your application classpath to use them.

You can download the distribution archive from the home page or here: apps.jrebirth.org

You can also clone and build from source on GitHub.

Maven Way -------------

The easiest way to get JRebirth jars is Maven.

Add these dependencies to your project <dependencies> section (see also the sample application pom.xml):

<dependencies>

	<!-- Use logback logger -->
	<dependency>
		<groupId>ch.qos.logback</groupId>
		<artifactId>logback-classic</artifactId>
		<version>1.5.32</version>
	</dependency>

	<dependency>
		<groupId>org.jrebirth.af</groupId>
		<artifactId>core</artifactId>
		<version>${jrebirth.latest.release.version}</version>
	</dependency>

	<dependency>
		<groupId>org.jrebirth.af</groupId>
		<artifactId>preloader</artifactId>
		<version>${jrebirth.latest.release.version}</version>
	</dependency>
	
</dependencies>

Use ${jrebirth.latest.release.version} (Maven Central release, currently ${jrebirth.latest.release.version}) for production. For the development line ${project.version}, add the GitHub Packages repository and depend on the same coordinates with that version.

Maven Repositories ============================

All stable JRebirth libraries are published to Maven Central. Snapshots are published to GitHub Packages.

  1. Maven Central — releases (default, no extra config)
  2. GitHub Packages — snapshots of the current development line
  3. Build from source on GitHub when you need a local install

Note: Bintray and JCenter were shut down in 2022. Do not configure them. The old repo.jrebirth.org Artifactory is no longer the recommended source.

Maven Central ----------------------

Maven Central is the default repository used by any Maven installation. You do not need extra repository configuration for stable JRebirth releases.

Browse artifacts: central.sonatype.com — org.jrebirth.af

GitHub Packages (snapshots) -------------------------------

Snapshot builds of the 12.x-dev line are published to GitHub Packages. Add a repository (and authentication for github) when you need snapshots:

<repositories>
	<repository>
		<id>github</id>
		<name>JRebirth GitHub Packages</name>
		<url>https://maven.pkg.github.com/JRebirth/JRebirth</url>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
		<releases>
			<enabled>true</enabled>
		</releases>
	</repository>
</repositories>

In ~/.m2/settings.xml, configure a server with id github and a GitHub personal access token that can read packages. See GitHub Packages documentation.

Alternatively, clone the repository and run mvn clean install under org.jrebirth.af.

JPMS Setup

For Java 11+ modular projects, your module-info.java should declare the required JRebirth modules and open your UI packages for reflection:

module com.example.myapp {
    requires org.jrebirth.af.core;
    requires org.jrebirth.af.component; // if using component library

    // opens your UI packages to jrebirth for reflection
    opens com.example.myapp.ui to org.jrebirth.af.core;
}

JRebirth uses reflection to instantiate Views and Controllers from Models. Without the opens directive, the framework will fail at runtime with IllegalAccessError. Open only the packages that contain your Model/View/Controller classes.