Choco: How to switch from one package version to another version with Java?

Created on 14 Nov 2018  路  4Comments  路  Source: chocolatey/choco

Hi,

I am reviewing some Packages about Java and I would like to recommend a stable way to switch from Java 8 to Java 11 in a stable way? In the review I noticed the package maintainers are different.

  • choco install jdk8
  • choco install openjdk

What is the best way?

  • Uninstall current package
  • Install new java package

Many thanks in advance

Juan Antonio

Question

Most helpful comment

Hi,

From my side using choco, the way that I found is to reinstall a new version with choco interface but honestly, it is not the same experience if you use sdkman in OSX:

First time:

sdk install java xxx
sdk install java yyy

In this moment, the Java verision installed is java

But in any moment, you can switch in a easy way to Java xxx in this way:

sdk use java xxx

With choco, you need to reinstal in any time but it is better than a manual installation.
I would like than in the future choco maintain multiple versions at the same time for this kind of packages.

Juan Antonio

All 4 comments

@jabrena This isn't an issue with Chocolatey. Your question would be better answered in Gitter

It still would be nice to have an answer here since the page is showing at top in the relevant search. @jabrena maybe you can share if you found how to do it?

Hi,

From my side using choco, the way that I found is to reinstall a new version with choco interface but honestly, it is not the same experience if you use sdkman in OSX:

First time:

sdk install java xxx
sdk install java yyy

In this moment, the Java verision installed is java

But in any moment, you can switch in a easy way to Java xxx in this way:

sdk use java xxx

With choco, you need to reinstal in any time but it is better than a manual installation.
I would like than in the future choco maintain multiple versions at the same time for this kind of packages.

Juan Antonio

Thanks, Juan! I also end-up using Sdkman.

Was this page helpful?
0 / 5 - 0 ratings