🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

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

Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x