Install Javelit

There are 2 main ways to install and run Javelit:

Read the details to get more information about each option.

Javelit requires A Java JDK >= 21.

  1. Install: (JBang is highly recommended)

    # recommended: install with jbang jbang app install javelit@javelit # vanilla curl -L -o javelit.jar https://repo1.maven.org/maven2/io/javelit/javelit/0.50.0/javelit-0.50.0-all.jar
  2. Validate the installation by running the Hello app:

    # jbang javelit hello # vanilla java -jar javelit.jar hello
  3. Jump to our Basic concepts.

  1. Add the dependency to your project
    <dependency> <groupId>io.javelit</groupId> <artifactId>javelit</artifactId> <version>0.50.0</version> </dependency>
  2. Launch the server in your project:
    void startJavelitServer() { // the Javelit app class class MyApp { public static void main(String[] args) { Jt.text("Hello World").use(); } } // prepare a Javelit server var server = Server.builder(MyApp.class, 8888).build(); // start the server - this is non-blocking server.start(); }
Option 1: Standalone

Best for getting started, simple apps, education, testing, documentation and demos.
JBang-style dependency import included.

Option 2: Embedded in a Maven/Gradle project

Best for complex apps, existing systems and production systems.

Option 3: Embedded in a Spring project

Best for ... integrating Javelit in a Spring project.

forum

Still have questions?

Go to our discussions forum for helpful information and advice from Javelit experts.