SDKMan, adding unlisted versions

SDKMan, adding unlisted versions

SDKMan is a fantastic tool, I believe no one has doubts! Since I installed it, my concerns with Gradle, Java, Kotlin versions, among other SDKs ended… As a JVM developer, just not needing to adjust the infamous JAVA_HOME, M2_HOME, and others, have already turned my days into happier days.

Something, however, gave me a certain headache that I would like to share with you:

I recently started implementing a project with Java 12. At first, I thought, just install this version with SDKMan, however, I was mistaken… the version didn't appear on any of the vendors when I ran sdk list java.

No alt text provided for this image

I still don't understand the reason for this gap, but I started to think about alternatives… I could install version 16 and make use of the Java retro compatibility, however, this started to look like a workaround.

I even thought about installing the pre-SDKMan, however, I was wondering how the Java version management at two distinct points on my operating system, in addition to possible changes to my POM to avoid compilation version errors. After some research, I found this post on StackOverflow, a solution that I thought was more elegant.:

It seems that downloading the missing version, then unpacking to: ~/.sdkman/candidates/java/ then renaming the extracted directory solves the problem.

With that, I continued using only 1 manager of Java in my operational system, taking advantage of the facilities of SDKMan! SDKMan is life!!!

---

Original post published at?https://dev.to/?on October 19th, 2021.

?? Anthony Accioly

Principal Engineer | Senior Architect | Engineering Leader | Specialised in Distributed Systems, Integration, and Data-Intensive Applications | Building and Leading High-Performance Teams for 17+ Years

3 年

Try asdf: https://github.com/asdf-vm/asdf. I moved on from Sdkman, nvm, pyenv, etc and never looked back.

要查看或添加评论,请登录

Arthur Fonseca的更多文章

社区洞察

其他会员也浏览了