Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions agent/src/main/java/dev/aikido/agent/Agent.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ public static void premain(String agentArgs, Instrumentation inst) {
if (new BooleanEnv("AIKIDO_DISABLE", /*default value*/ false).getValue()) {
return; // AIKIDO_DISABLE is true, so we will not be wrapping anything.
}
int javaVersion = Runtime.version().feature();
if (javaVersion < 17) {
logger.error("Zen by Aikido requires Java 17 or newer. Current version: %d. The agent will not be loaded.", javaVersion);
return;
}
if (javaVersion > 24) {
logger.error("Zen by Aikido does not support Java %d (max supported version: 24). The agent will not be loaded.", javaVersion);
return;
}
logger.info("Zen by Aikido v%s starting.", Config.pkgVersion);
setAikidoSysProperties();

Expand Down
Loading