Java, Kotlin and the JVM
25 subscribers
20 photos
2 videos
117 links
Java, Kotlin, Gradle, Maven, JDKs, Spring and the whole JVM ecosystem tips & tricks. 🇪🇸 & 🇬🇧
Download Telegram
Have you suffered ThreadLocals?

Scoped Values are a significant enhancement to Java because they provide a more efficient and safer mechanism for sharing data across threads, especially with virtual threads. Unlike thread-local variables, Scoped Values offer controlled mutability, bounded lifetimes, and reduced overhead, addressing critical issues like memory leaks and complexity, ultimately leading to more reliable and performant applications.

https://openjdk.org/jeps/487
Up for grab issues selected by Ktor team
JDK 24 is out!! The final release before the new LTS coming in September.

https://blogs.oracle.com/java/post/the-arrival-of-java-24
👏1
JDK 24 introduces the concept of an ahead-of-time cache which incrementally improves upon the CDS technology that has been a part of the JDK since 2004.




JEP 483 is a first deliverable of the Project Leyden whose goal it is to improve startup, warmup and footprint of Java programs while staying true to the dynamic nature of the Java language



https://inside.java/2025/03/19/performance-improvements-in-jdk24/
👏1
The kotlin-metadata-jvm library extracts structured information from compiled Kotlin .class files, such as class names, visibility, and signatures. You can use it in projects that need to analyze compiled Kotlin declarations.

https://kotlinlang.org/docs/metadata-jvm.html#modify-metadata
Context parameters will replace context receivers, an evolution of the feature which addressed all provided feedback

Context parameters are an upcoming feature in Kotlin, with a variety of use cases including more powerful extension methods and better tools for DSL development. Kotlin 2.2.0 will feature context parameters in Beta, and dedicated IntelliJ IDEA support will be available from 2025.1


More information on the migration from context receivers to context parameters and a reference to the new KEEP in the following post:

https://blog.jetbrains.com/kotlin/2025/04/update-on-context-parameters/
JEP 517: Support for HTTP/3 in Java Standard HTTP Client

https://openjdk.org/jeps/517
JVector, the library that powers DataStax Astra vector search, now supports indexing larger-than-memory datasets by performing construction-related searches with compressed vectors. This means that the edge lists need to fit in memory, but the uncompressed vectors do not, which gives us enough headroom to index Wikipedia-en on a laptop



https://foojay.io/today/indexing-all-of-wikipedia-on-a-laptop/
I will publish more detailed posts about most relevant features for me 🤞🤝
https://blogs.oracle.com/java/post/the-arrival-of-java-25
🚀 Java 25 introduces Compact Object Headers, a feature designed to shrink object sizes!

📦📏 This feature reduces the size of object headers from 96-128 bits down to just 64 bits on 64-bit systems.

🤔 What does this mean for your apps?
Smaller heap sizes 💾
Improved deployment density
Increased data locality

This feature was included a experimental in Java 24 (JEP 450 - https://openjdk.org/jeps/450) 🧪 and is now a stable feature in Java 25 (JEP 519 - https://openjdk.org/jeps/519)! 🎉

⚠️ Important: It's not enabled by default. You need to activate it with a JVM flag.

💻 To enable it, simply use this command:
java -XX:+UseCompactObjectHeaders MyApp


📚 Want to learn more? Check out the detailed article from InfoQ for performance benchmarks:
https://www.infoq.com/news/2025/06/java-25-compact-object-headers/