Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Can We Change Setting In Jenkins As It Picks Desire Version Of Java.

Namit created the topic: Can we change setting in Jenkins as it picks desire version of Java.
In my Linux server i do have two version of Java (Java 1.6 and Java 1.8), few applications which are running on this server is using Java 1.6, so i cann’t change this setting but i want when i start jenkins service it should pick java 1.8 instead of java 1.6 as for jenkins Java 7 or more is require. Is there any way to fix this problem.

[root@rpc1372 run]# ls -l /usr/bin/java
lrwxrwxrwx 1 root root 30 Jun 15 2014 /usr/bin/java -> /usr/java/jdk1.6.0_19/bin/java

[root@rpc1372 run]# java -version
java version “1.6.0_19”
Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Java HotSpot(TM) Client VM (build 16.2-b04, mixed mode, sharing)

rajeshkumar replied the topic: Can we change setting in Jenkins as it picks desire version of Java.
There are basically 2 way –
Method 1: Modify the “jenkins” file under /etc/init.d

[root@chef-server init.d]# pwd
/etc/init.d
[root@chef-server init.d]# more jenkins | grep -i java
# Search usable Java. We do this because various reports indicated
# that /usr/bin/java may not always point to Java >= 1.6
/etc/alternatives/java
/usr/lib/jvm/java-1.6.0/bin/java
/usr/lib/jvm/jre-1.6.0/bin/java
/usr/lib/jvm/java-1.7.0/bin/java
/usr/lib/jvm/jre-1.7.0/bin/java
/usr/lib/jvm/java-1.8.0/bin/java
/usr/lib/jvm/jre-1.8.0/bin/java
/usr/bin/java
[ -x "$JENKINS_JAVA_CMD" ] && break
JENKINS_JAVA_CMD="$candidate"
JAVA_CMD="$JENKINS_JAVA_CMD $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"
daemon --user "$JENKINS_USER" --pidfile "$JENKINS_PID_FILE" $JAVA_CMD $PARAMS > /dev/null

Method 2: Start jenkins using the java which you want manually

. Follow this article
wiki.jenkins-ci.org/display/JENKINS/Star…nd+Accessing+Jenkins
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

What is Jenkins and use cases of Jenkins?

What is Jenkins? Jenkins is an open-source automation server widely used for building, testing, and deploying software projects. It provides a platform for continuous integration and continuous…

Read More

Jenkins Tutorials: Installing Jenkins on Tomcat

We are going to discuss Installing Jenkins today. We will be focusing on installing it on Tomcat server as a servlet, and tomcat will act as a…

Read More

Jenkins Tutorials: Install Jenkins as Docker Container

In the Previous Post we Learned How to install Jenkins as Servlet on Tomcat server. In this post we will try even simple and easy way to…

Read More

Top Jenkins interview questions and answers

1. What is Jenkins? Jenkins is an open-source automation server that helps automate various aspects of software development, such as building, testing, and deploying code. It allows…

Read More

How to Implement GitOps Using Jenkins?

Hello there, fellow tech enthusiasts! In this blog post, we are going to delve into the world of GitOps and learn how to implement it using Jenkins….

Read More

Jenkins Tutorial: Install Jenkins on Ubuntu

In this tutorial we are going to install Jenkins on Ubuntu operating system. Ubuntu is another debian based operating system – open sourced and highly loved by…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x