Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any sdk manager for java for sdkman for grails, groovy and gradle [closed]

Currently having issues with the current java development kit version which i am using with grails which is common when using springboot with some java 8 versions on grails

Caused by: java.lang.IllegalArgumentException: Can not copy a non-root Method at java.lang.reflect.Method.copy(Method.java:151) ... 120 more

Is ther any sdk manager which i can use to download a specific java version which would not only download but also

  1. Set current java path
  2. Set current java home
  3. if possible set java options

I know of update_alrenatives in ubuntu But I am talking about somwthing like gvm or sdkman

Other good options would be appreciated, Thanks

like image 487
JohnTheBeloved Avatar asked Jan 30 '26 21:01

JohnTheBeloved


2 Answers

I use Jabba to manage my java environment. It is easy to install and start using right away with a simple curl or wget command on Linux/Mac OS X.

 curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh

or

 wget -qO- https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh

and for Windows 10 (in powershell)

Invoke-Expression (wget https://github.com/shyiko/jabba/raw/master/install.ps1 -UseBasicParsing).Content

Once this is done installing and switching jdk's is easy.

Install

install Oracle JDK

jabba install 1.8

install Zulu OpenJDK

jabba install [email protected]

install from custom URL or file path

jabba install 1.8.0-custom=tgz+http://example.com/distribution.tar.gz
jabba install 1.8.0-custom=zip+file:///opt/distribution.zip

after each install "jabba use " will be called automatically.

List JDK's

list all installed JDK's

jabba ls

list available JDK's

jabba ls-remote

Switch JDK's

switch to a different version of JDK

jabba use 1.6.65

switch to the JDK specified in .jabbarc

jabba use

Set default JDK

echo "1.8" > .jabbarc

this version will automatically be "jabba use"d every time you open up a new terminal

jabba alias default 1.6.65

jabba keeps everything under ~/.jabba (on Linux/Mac OS X) / %USERPROFILE%/.jabba (on Windows).

like image 51
Andrew Pullins Avatar answered Feb 02 '26 13:02

Andrew Pullins


You can now use sdkman to install and manage java.

sdk install java

http://sdkman.io/usage.html

like image 41
TheKojuEffect Avatar answered Feb 02 '26 11:02

TheKojuEffect



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!