Enables Jetty ALPN/NPN support via -javaagent JVM option
Clone or download


Jetty ALPN Agent

jetty-alpn-agent is a JVM agent that enables TLS ALPN (or NPN) extension support for Java 7 and 8 by loading the correct Jetty alpn-boot (or npn-boot) JAR file for the current Java version.


Specify the path to the agent JAR file with a -javaagent option:

java -javaagent:<path/to/jetty-alpn-agent.jar> ...

To use NPN instead of ALPN, specify the forceNpn=true option:

java -javaagent:<path/to/jetty-alpn-agent.jar>=forceNpn=true ...

To enable debug logs, specify the debug=true option:

java -javaagent:<path/to/jetty-alpn-agent.jar>=debug=true ...

Using with Maven

Use maven-dependency-plugin to fetch the agent JAR and add the path to the downloaded agent JAR to the command line arguments:


Additional resources

For more information, please refer to the following resources:


This product is licensed under Apache License 2.0.

This product redistributes the original alpn-boot and npn-boot JARs, which are licensed under GPLv2 with classpath exception, whose source code is located at:


This library has been initially created by Trustin Lee. The Jetty Project took ownership in February 2016. Version 2.0.0 was the first release under the Jetty Project stewardship.