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
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/
Ever call Java 21 an "LTS release"?

OpenJDK's own site already says it's "superseded." ๐Ÿ’€
๐Ÿ‘‰ https://jdk.java.net/21/

Friendly reminder:
LTS comes from vendors (Oracle, Azul, etc.), not OpenJDK.

OpenJDK just builds the JDK for ~6 months and dips. ๐Ÿ˜‚

It's not an "LTS version," it's a version that gets LTS. Pass it on!

P.S. Yeah, this is a semantic debate, but it's relevant for understanding the difference between OpenJDK (the project), Java (the language), and the vendor distributions we all use. ๐Ÿ‘
I have compiled a list of what I think are the most interesting and useful security enhancements in this release. I have also grouped them into appropriate categories (crypto, TLS, etc) which should make it easier to find out what has changed in each specific area

Summary

๐Ÿ”‘ PEM Encodings: New API to easily handle keys/certs in PEM format.
โš™๏ธ KDF API: Final version of API for deriving keys.
๐Ÿ›ก๏ธ SHA-1 Disabled: SHA-1 is now off by default for TLS handshakes.
โœ… TLS/CNSA 1.0 Requirements: Adds modern algorithm requirements.
๐Ÿš€ Performance: Faster crypto algorithms (ML-KEM, ML-DSA, ChaCha20).

https://seanjmullan.org/blog/2025/09/23/jdk25
Estaba viendo un video de la serie #RoadTo25 y encontrรฉ unas notas interesantes (https://cr.openjdk.org/~skuksenko/jep519/performance.txt) sobre las posibles regresiones de rendimiento al habilitar Compact Object Headers (COH).

El presentador habla de ello a partir del minuto 6:27 del video.

Obviamente, el resumen esta claro COH es un trade-off. En teorรญa, un menor consumo de memoria deberรญa mejorar el rendimiento al reducir el use del recolector de basura (GC) y aprovechar mejor la cachรฉ de la CPU. Pero, como todo trade-off, tiene un coste, como tiempos de inicio mรกs lentos o un impacto negativo en ciertos benchmarks.

Al parecer, construir un archivo de Class Data Sharing (CDS) puede ayudar a mitigar esos problemas de rendimiento en el arranque, no es una feature que yo haya usado y tengo la impresiรณn que no es muy usada en general.

De todos modos, me encanta indagar en estas pequeรฑas peculiaridades porque me ayuda a entender mejor el potencial de la JVM como plataforma a gran escala.

๐Ÿ“น https://www.youtube.com/watch?v=renTMvh51iM&t=383s
Ni me acordaba de los Applet ya ๐Ÿคฃ

๐Ÿ‘‹๐Ÿ‘‹๐Ÿ‘‹๐Ÿ‘‹๐Ÿ‘‹๐Ÿ‘‹๐Ÿ‘‹๐Ÿ‘‹๐Ÿ‘‹
Remove the Applet API, which was deprecated for removal in JDK 17 (2021). It is obsolete because neither recent JDK releases nor current web browsers support applets.


Hasta Java 26 llegaron (https://openjdk.org/jeps/504), al parecer Firefox quitรณ soporte de applets en 2017

Si no sabes que era un applet ๐Ÿ‘‰ https://www.vice.com/en/article/a-brief-history-of-the-java-applet/