Find Related products on Amazon

Shop on Amazon

Let's Take a Look at JEP 483: Ahead-of-Time Class Loading and Linking

Published on: 2025-09-28 00:11:55

Coincidentally, Apache Kafka 4.0 was released last week, too. So let’s download it and use it for our experiments. Unpack the distribution and format a directory for the Kafka files: 1 2 3 tar xvf kafka_2.13-4.0.0.tgz KAFKA_CLUSTER_ID = " $( bin/kafka-storage.sh random-uuid ) " bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config/server.properties Building an AOT cache is a two-step process. First, a list of all the classes which should go into the archive needs to be generated. This list is then used for creating the archive itself. This feels a bit more convoluted than it should be, and indeed the JEP mentions that simplifying this is on the roadmap. Create the class list like so: 1 2 export EXTRA_ARGS = "-XX:AOTMode=record -XX:AOTConfiguration=kafka.aotconf" (1) bin/kafka-server-start.sh config/server.properties 1 The EXTRA_ARGS variable can be used to pass any additional arguments to the JVM when launching Kafka, in this case to specify that the list of clas ... Read full article.