Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsupported Java version: 11 #78

Open
shah-sid opened this issue May 9, 2019 · 9 comments
Open

unsupported Java version: 11 #78

shah-sid opened this issue May 9, 2019 · 9 comments

Comments

@shah-sid
Copy link

shah-sid commented May 9, 2019

Jenkins version - 2.164.2
Gitlab-Hook Plugin version - 1.4.2
Ruby-Runtime version 0.13

Trying to install gitlab-hook plugin in jenkins,
while installing ruby-runtime it throws error

java.lang.RuntimeException: unsupported Java version: 11 at org.jruby.RubyInstanceConfig.initGlobalJavaVersion(RubyInstanceConfig.java:1674) at org.jruby.RubyInstanceConfig.<clinit>(RubyInstanceConfig.java:1387) Caused: java.lang.ExceptionInInitializerError at org.jruby.embed.internal.AbstractLocalContextProvider.<init>(AbstractLocalContextProvider.java:42)

Tried installing Ruby-runtime plugin too but same error.
Please look into it.

Thanks

Screenshot from 2019-05-09 11-32-52

@Lim-LinYuanbo
Copy link

stay tuned

@zhumabek
Copy link

zhumabek commented May 2, 2020

Hi, I solved it by changing java version to 8th.
Maybe there is a problem with java 11 compatibility issues.
https://www.jenkins.io/doc/administration/requirements/jenkins-on-java-11/

@yuanzhiying
Copy link

Hi, I solved it by changing java version to 8th.
Maybe there is a problem with java 11 compatibility issues.
https://www.jenkins.io/doc/administration/requirements/jenkins-on-java-11/

Thanks.

@Offliner21
Copy link

Hello everyone! I still have the same issue with java 11. The compatibility issue still persists on my side I am using Ubuntu 20.04.
Any fix available?
PS: It's mandatory for my project that I work with java 11.

@InfiniteDreamz
Copy link

Hi, I solved it by changing java version to 8th.
Maybe there is a problem with java 11 compatibility issues.
https://www.jenkins.io/doc/administration/requirements/jenkins-on-java-11/

How can switch the JVM version to Java 8. I'm using MAC OS Big SUR. Running Jenkins without Docker and just starting with these tools. Please help. @yuanzhiying @zhumabek

@FineRoot1253
Copy link

FineRoot1253 commented Apr 16, 2021

This is the manual solution I think I found. (may not, but this is works to me)

Jenkins version - 2.277.1
OS - Mac os : catalina

First, enter this into the terminal

vi /usr/local/Cellar/jenkins/2.x.x/homebrew.mxcl.jenkins.plist

(2.x.x is 2.277.1 for me.)

Then you will see this.

   <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
   <plist version="1.0">
     <dict>
       <key>Label</key>
       <string>homebrew.mxcl.jenkins-lts</string>
       <key>ProgramArguments</key>
       <array>
         **<string>/usr/local/opt/openjdk@11/bin/java</string>**
         <string>-Dmail.smtp.starttls.enable=true</string>
         <string>-jar</string>
         <string>/usr/local/opt/jenkins-lts/libexec/jenkins.war</string>
         <string>--httpListenAddress=0.0.0.0</string>
         <string>--httpPort=8080</string>
       </array>
       <key>RunAtLoad</key>
       <true/>
     </dict>
   </plist>
     **<string>/usr/local/opt/openjdk@11/bin/java</string>**

change here like this

   <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
   <plist version="1.0">
     <dict>
       <key>Label</key>
       <string>homebrew.mxcl.jenkins-lts</string>
       <key>ProgramArguments</key>
       <array>
         **<string>/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java</string>**
         <string>-Dmail.smtp.starttls.enable=true</string>
         <string>-jar</string>
         <string>/usr/local/opt/jenkins-lts/libexec/jenkins.war</string>
         <string>--httpListenAddress=0.0.0.0</string>
         <string>--httpPort=8080</string>
       </array>
       <key>RunAtLoad</key>
       <true/>
     </dict>
   </plist>

Then restart brew services
Now ruby-runtime should work normally, I write it down hoping it will help someone.

@chunta
Copy link

chunta commented Jun 12, 2021

has ** ?

@FineRoot1253
Copy link

FineRoot1253 commented Jun 14, 2021

has ** ?

@chunta
What does ** mean?

@zhyafe
Copy link

zhyafe commented Sep 15, 2021

I have solved this problem refer to @JunGeunHong1129
Pay attention to two points:

  1. none **
  2. Use shortcut keys(command+Option+C) to obtain the path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants