Install Javelit
There are 2 main ways to install and run Javelit:
Read the details to get more information about each option.
Short Version
Javelit requires A Java JDK >= 21.
Standalone CLI and app runner
-
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.76.0/javelit-0.76.0-all.jar -
Validate the installation by running the Hello app:
# jbang javelit hello # vanilla java -jar javelit.jar hello -
Jump to our Basic concepts.
Embedded server
- Add the dependency to your project
<dependency> <groupId>io.javelit</groupId> <artifactId>javelit</artifactId> <version>0.76.0</version> </dependency> - Launch the server in your project:
// the javelit app void app() { Jt.text("Hello World").use(); } void startJavelitServer() { // prepare a Javelit server var server = Server.builder(() -> app(), 8888).build(); // start the server - this is non-blocking server.start(); }
Details
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.
Still have questions?
Go to our discussions forum for helpful information and advice from Javelit experts.