How to run jenkins in jdk 1.6

74 views
Skip to first unread message

Panikera Raj

unread,
Aug 26, 2016, 5:23:01 AM8/26/16
to jenkins...@googlegroups.com
Hi All,

I have a problem, please do help me on this

First I have installed JDK 1.7 in windows-64 bit machine, then I have started jenkins, in jenkins i have created some projects Called Android and I was able executing successfully, But later I am facing some issue in Android project, so I have downgraded My Java JDK to 1.6, Here only my actual problem started,
          After downgrading java version I am trying run jenkins, but I am facing blow exception.
D:\Jenkins>java -jar jenkins.war
Jenkins requires Java7 or later, but you are running 1.6.0_21-b06 from C:\Program Files\Java\jdk1.6.0_21\jre
java.lang.UnsupportedClassVersionError: 50.0 at Main.main (Main.java:83)

D:\Jenkins>


Please let me know how to resolve this issue. I don't have other chance to upgrade the Java version to 1.7, I have to use 1.6 only please help me on this.
your help will be highly appriciated

-Panikera



nicolas de loof

unread,
Aug 26, 2016, 6:25:54 AM8/26/16
to jenkins...@googlegroups.com
You have to distinguish the JDK running jenkins and the JDK building your project. You can configure jenkins to build with arbitrary JDK, using Java installations on global configuration and selecting the adequate one for your jobs

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAEzR4Zxk8CKY4-zGmPGfve2K5T6RiYb2Oevg2xwcTc7unh273Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Panikera Raj

unread,
Aug 26, 2016, 7:23:52 AM8/26/16
to jenkins...@googlegroups.com
Can you bit elaborate about this,

how cay achieve this, is there any configuration file where I can specify to use JDK 1.6

-Panikera


Panikera Raj

unread,
Aug 26, 2016, 7:31:54 AM8/26/16
to jenkins...@googlegroups.com
FYI...

I have uninstalled JDK 1.7 version.

-Panikera

Chris Selwyn

unread,
Aug 26, 2016, 7:36:21 AM8/26/16
to jenkins...@googlegroups.com
You cannot run Jenkins itself on anything less than JDK 7.
What Nicolas was saying was that it is, however, still possible to have
Jenkins build with JDKs less that JDK 7 by adding them to the Jenkins
configuration using the setting in "Manage Jenkins".

So you need to have at least JDK 7 installed and then whatever other
JDKs that you wish to use to perform builds.

Chris Selwyn
>>> send an email to jenkinsci-use...@googlegroups.com.
>>> [1].
>>> For more options, visit https://groups.google.com/d/optout [2].
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to jenkinsci-use...@googlegroups.com.
>> To view this discussion on the web visit
>>
> https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzkxY_RQLWuO5Bff1ekGAZrnqTWxfb1bwvT0yUwA0LJg9g%40mail.gmail.com
>> [3].
>> For more options, visit https://groups.google.com/d/optout [2].
>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAEzR4Zyd85EZhrWJ2zuuGHqoCQpwiCi0nRMH99e-fYEPL65Xtg%40mail.gmail.com
> [4].
> For more options, visit https://groups.google.com/d/optout.
>
>
> Links:
> ------
> [1]
> https://groups.google.com/d/msgid/jenkinsci-users/CAEzR4Zxk8CKY4-zGmPGfve2K5T6RiYb2Oevg2xwcTc7unh273Q%40mail.gmail.com?utm_medium=email&utm_source=footer
> [2] https://groups.google.com/d/optout
> [3]
> https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzkxY_RQLWuO5Bff1ekGAZrnqTWxfb1bwvT0yUwA0LJg9g%40mail.gmail.com?utm_medium=email&utm_source=footer
> [4]
> https://groups.google.com/d/msgid/jenkinsci-users/CAEzR4Zyd85EZhrWJ2zuuGHqoCQpwiCi0nRMH99e-fYEPL65Xtg%40mail.gmail.com?utm_medium=email&utm_source=footer

Panikera Raj

unread,
Aug 26, 2016, 7:48:21 AM8/26/16
to jenkins...@googlegroups.com
I have other windows setup which I had JDK 1.6, there I can start jenkins successfully and using for daily activities.

-Panikera



To view this discussion on the web visit

[1].
For more options, visit https://groups.google.com/d/optout [2].

--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it,

To view this discussion on the web visit


 --
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send

To view this discussion on the web visit
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f20904727b4faed4863820ef60e57723%40selwyn-family.me.uk.

Chris Selwyn

unread,
Aug 26, 2016, 8:04:33 AM8/26/16
to jenkins...@googlegroups.com
I suggest you read https://jenkins.io/blog/2015/04/06/good-bye-java6/.

Chris Selwyn
>> send an email to jenkinsci-use...@googlegroups.com.
> [2]
>
>>> [1].
>>> For more options, visit https://groups.google.com/d/optout [1]
>>> [2].
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to jenkinsci-use...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout [1] [2].
>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-use...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout [1].
> [5]
> [2] https://groups.google.com/d/optout [1]
> [3]
> https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzkxY_RQLWuO5Bff1ekGAZrnqTWxfb1bwvT0yUwA0LJg9g%40mail.gmail.com?utm_medium=email&utm_source=footer
> [6]
> [4]
> https://groups.google.com/d/msgid/jenkinsci-users/CAEzR4Zyd85EZhrWJ2zuuGHqoCQpwiCi0nRMH99e-fYEPL65Xtg%40mail.gmail.com?utm_medium=email&utm_source=footer
> [7]
>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/f20904727b4faed4863820ef60e57723%40selwyn-family.me.uk
> [8].
>
> For more options, visit https://groups.google.com/d/optout [1].
>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAEzR4Zz_QJSugDJBm_wr6cNBRhviwDwvD_yfjtEULCLqgGrW2Q%40mail.gmail.com
> [9].
> For more options, visit https://groups.google.com/d/optout.
>
>
> Links:
> ------
> [1] https://groups.google.com/d/optout
> [2]
> https://groups.google.com/d/msgid/jenkinsci-users/CAEzR4Zxk8CKY4-zGmPGfve2K5T6RiYb2Oevg2xwcTc7unh273Q%40mail.gmail.com
> [3]
> https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzkxY_RQLWuO5Bff1ekGAZrnqTWxfb1bwvT0yUwA0LJg9g%40mail.gmail.com
> [4]
> https://groups.google.com/d/msgid/jenkinsci-users/CAEzR4Zyd85EZhrWJ2zuuGHqoCQpwiCi0nRMH99e-fYEPL65Xtg%40mail.gmail.com
> [5]
> https://groups.google.com/d/msgid/jenkinsci-users/CAEzR4Zxk8CKY4-zGmPGfve2K5T6RiYb2Oevg2xwcTc7unh273Q%40mail.gmail.com?utm_medium=email&utm_source=footer
> [6]
> https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzkxY_RQLWuO5Bff1ekGAZrnqTWxfb1bwvT0yUwA0LJg9g%40mail.gmail.com?utm_medium=email&utm_source=footer
> [7]
> https://groups.google.com/d/msgid/jenkinsci-users/CAEzR4Zyd85EZhrWJ2zuuGHqoCQpwiCi0nRMH99e-fYEPL65Xtg%40mail.gmail.com?utm_medium=email&utm_source=footer
> [8]
> https://groups.google.com/d/msgid/jenkinsci-users/f20904727b4faed4863820ef60e57723%40selwyn-family.me.uk
> [9]
> https://groups.google.com/d/msgid/jenkinsci-users/CAEzR4Zz_QJSugDJBm_wr6cNBRhviwDwvD_yfjtEULCLqgGrW2Q%40mail.gmail.com?utm_medium=email&utm_source=footer

Panikera Raj

unread,
Aug 26, 2016, 8:09:28 AM8/26/16
to jenkins...@googlegroups.com
I got the issue, Looks like backward compatibility is not there for jenkins. after downgrading jenkins version it is able to start with JDK 1.6. Not sure what is behind do not support for older version. 

anyway thanks guys, much appreciated your help.

-Panikera






To view this discussion on the web visit
[1].
For more options, visit https://groups.google.com/d/optout [1]
[2].

--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it,

To view this discussion on the web visit

 --
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send


--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send

 To view this discussion on the web visit


 --
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send

To view this discussion on the web visit
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b94ab6fe7af7ee3a4395a3621e2b21ba%40selwyn-family.me.uk.

Björn Pedersen

unread,
Aug 26, 2016, 10:11:05 AM8/26/16
to Jenkins Users
Hi,

You should really read the blog post. Jenkins itself need at least JDK1.7 to run (actually only a JRE1.7) . But you can install more than one jdk on a machine, so the jobs can use an older jdk to build soemthing.
To configure the available jdks, go  to 'manage jenkins' -> 'Configure tools'.

Björn
Reply all
Reply to author
Forward
0 new messages