gradle with a 1.4 jdk

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

gradle with a 1.4 jdk

JerodLass
I need to run gradle with a 1.4 jdk, specifically IBM's 1.4 jdk.  The reason for this is that I need to run a websphere EJB deploy ant task to create some EJBs and I have found that this is dependent on IBM's was 5.1 jdk, which is version 1.4.2.  I am on a Windows XP machine, so I have the regular windows cmd and also cygwin.  When I try to use gradle (even gradle -v) in cygwin if my JAVA_HOME is set to the 1.4 JDK, I get the error:

The java class could not be loaded. java.lang.UnsupportedClassVersionError: org/gradle/BootstrapMain (Unsupported major.minor version 49.0)

This happens both with the current snapshot of gradle and the current svn version of gradle, even if I build the source with the 1.4 jdk.

In Windows cmd, both the current snapshot and the current svn built with 1.4 jdk appear to work.  I can execute gradle -v and gradle clean runs quickly, but if I actually try to build something, gradle starts quickly and each successive project configuration takes more time until eventually it runs out of memory.  I've never used gradle in cmd so I guess it doesn't surprise me that it doesn't work, but how can I get gradle running with IBM's 1.4 JDK in cygwin?

Any thoughts would be very much appreciated.

-Jerod
Reply | Threaded
Open this post in threaded view
|

Re: gradle with a 1.4 jdk

hans_d
Administrator
Hi Jerod,

On Jul 10, 2008, at 5:42 PM, JerodLass wrote:

>
> I need to run gradle with a 1.4 jdk, specifically IBM's 1.4 jdk.  
> The reason
> for this is that I need to run a websphere EJB deploy ant task to  
> create
> some EJBs and I have found that this is dependent on IBM's was 5.1  
> jdk,
> which is version 1.4.2.  I am on a Windows XP machine, so I have  
> the regular
> windows cmd and also cygwin.  When I try to use gradle (even gradle  
> -v) in
> cygwin if my JAVA_HOME is set to the 1.4 JDK, I get the error:
>
> The java class could not be loaded.  
> java.lang.UnsupportedClassVersionError:
> org/gradle/BootstrapMain (Unsupported major.minor version 49.0)
>
> This happens both with the current snapshot of gradle and the  
> current svn
> version of gradle, even if I build the source with the 1.4 jdk.
>
> In Windows cmd, both the current snapshot and the current svn built  
> with 1.4
> jdk appear to work.  I can execute gradle -v and gradle clean runs  
> quickly,
> but if I actually try to build something, gradle starts quickly and  
> each
> successive project configuration takes more time until eventually  
> it runs
> out of memory.  I've never used gradle in cmd so I guess it doesn't  
> surprise
> me that it doesn't work, but how can I get gradle running with  
> IBM's 1.4 JDK
> in cygwin?
>
> Any thoughts would be very much appreciated.

As we use Java 5 features, Gradle can't run on a JDK 1.4 right now.  
There is a retroweaver project though which makes 1.5 bytecode 1.4  
compatible. I know that the Groovy project is using this. I need to  
have a look into this or you might have. I would be cool to have a  
jdk1.4 compatible Gradle distribution.

- Hans

>
> -Jerod
> --
> View this message in context: http://www.nabble.com/gradle-with- 
> a-1.4-jdk-tp18385565p18385565.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: gradle with a 1.4 jdk

Jerod Lass
Is there a way to run gradle with the 1.5 jdk but tell it to compile everything with a specific 1.4 jdk?  Even if only the ant task uses 1.4, it should work.  It's only the ant task that needs and IBM-specific 1.4 jdk.  Thanks

-Jerod

On Thu, Jul 10, 2008 at 10:57 AM, Hans Dockter <[hidden email]> wrote:
Hi Jerod,


On Jul 10, 2008, at 5:42 PM, JerodLass wrote:


I need to run gradle with a 1.4 jdk, specifically IBM's 1.4 jdk.  The reason
for this is that I need to run a websphere EJB deploy ant task to create
some EJBs and I have found that this is dependent on IBM's was 5.1 jdk,
which is version 1.4.2.  I am on a Windows XP machine, so I have the regular
windows cmd and also cygwin.  When I try to use gradle (even gradle -v) in
cygwin if my JAVA_HOME is set to the 1.4 JDK, I get the error:

The java class could not be loaded. java.lang.UnsupportedClassVersionError:
org/gradle/BootstrapMain (Unsupported major.minor version 49.0)

This happens both with the current snapshot of gradle and the current svn
version of gradle, even if I build the source with the 1.4 jdk.

In Windows cmd, both the current snapshot and the current svn built with 1.4
jdk appear to work.  I can execute gradle -v and gradle clean runs quickly,
but if I actually try to build something, gradle starts quickly and each
successive project configuration takes more time until eventually it runs
out of memory.  I've never used gradle in cmd so I guess it doesn't surprise
me that it doesn't work, but how can I get gradle running with IBM's 1.4 JDK
in cygwin?

Any thoughts would be very much appreciated.

As we use Java 5 features, Gradle can't run on a JDK 1.4 right now. There is a retroweaver project though which makes 1.5 bytecode 1.4 compatible. I know that the Groovy project is using this. I need to have a look into this or you might have. I would be cool to have a jdk1.4 compatible Gradle distribution.

- Hans



-Jerod
--
View this message in context: http://www.nabble.com/gradle-with-a-1.4-jdk-tp18385565p18385565.html
Sent from the gradle-user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



--
Hans Dockter
Gradle Project lead
http://www.gradle.org






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: gradle with a 1.4 jdk

hans_d
Administrator
In reply to this post by hans_d
Hi Jerod,

On Jul 10, 2008, at 5:57 PM, Hans Dockter wrote:

> Hi Jerod,
>
> On Jul 10, 2008, at 5:42 PM, JerodLass wrote:
>
>>
>> I need to run gradle with a 1.4 jdk, specifically IBM's 1.4 jdk.  
>> The reason
>> for this is that I need to run a websphere EJB deploy ant task to  
>> create
>> some EJBs and I have found that this is dependent on IBM's was 5.1  
>> jdk,
>> which is version 1.4.2.  I am on a Windows XP machine, so I have  
>> the regular
>> windows cmd and also cygwin.  When I try to use gradle (even  
>> gradle -v) in
>> cygwin if my JAVA_HOME is set to the 1.4 JDK, I get the error:
>>
>> The java class could not be loaded.  
>> java.lang.UnsupportedClassVersionError:
>> org/gradle/BootstrapMain (Unsupported major.minor version 49.0)
>>
>> This happens both with the current snapshot of gradle and the  
>> current svn
>> version of gradle, even if I build the source with the 1.4 jdk.
>>
>> In Windows cmd, both the current snapshot and the current svn  
>> built with 1.4
>> jdk appear to work.  I can execute gradle -v and gradle clean runs  
>> quickly,
>> but if I actually try to build something, gradle starts quickly  
>> and each
>> successive project configuration takes more time until eventually  
>> it runs
>> out of memory.  I've never used gradle in cmd so I guess it  
>> doesn't surprise
>> me that it doesn't work, but how can I get gradle running with  
>> IBM's 1.4 JDK
>> in cygwin?
>>
>> Any thoughts would be very much appreciated.
>
> As we use Java 5 features, Gradle can't run on a JDK 1.4 right now.  
> There is a retroweaver project though which makes 1.5 bytecode 1.4  
> compatible. I know that the Groovy project is using this. I need to  
> have a look into this or you might have. I would be cool to have a  
> jdk1.4 compatible Gradle distribution.

It looks very easy to use retroweaver. I'm wondering if there are any  
disadvantages for Java 5 machines (e.g. performance). Otherwise we  
could soon make the standard Gradle distribution JDK 1.4 compatible  
(if there are no issues ;)). Tonight I won't make it but probably  
tomorrow morning my time.

- Hans

>
> - Hans
>
>>
>> -Jerod
>> --
>> View this message in context: http://www.nabble.com/gradle-with- 
>> a-1.4-jdk-tp18385565p18385565.html
>> Sent from the gradle-user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>
> --
> Hans Dockter
> Gradle Project lead
> http://www.gradle.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: gradle with a 1.4 jdk

hans_d
Administrator
In reply to this post by Jerod Lass

On Jul 10, 2008, at 6:26 PM, Jerod Lass wrote:

> Is there a way to run gradle with the 1.5 jdk but tell it to  
> compile everything with a specific 1.4 jdk?

To Gradle compile task delegates to the Ant javac task. You can set  
most of the options via the Gradle task. Have a look at: http://
ant.apache.org/manual/CoreTasks/javac.html

This task has the options fork an executable. So this looks pretty  
straight forward.

> Even if only the ant task uses 1.4, it should work.  It's only the  
> ant task that needs and IBM-specific 1.4 jdk.  Thanks

I don't see a way to execute an Ant task with a different JDK within  
the same JVM Gradle is running. I guess you have to use an external  
process for this. An ugly way of doing this would be to provide a  
build xml or a groovy script which calls the Ant task. You could call  
the script with the IBM JDK from your build.gradle file. Not very  
nice but it should work.

Providing a JDK 1.4 compatible Gradle looks like the easiest solution.

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: gradle with a 1.4 jdk

Jerod Lass
 I am trying to use retroweaver to compile gradle, but since i am on a 1.4 jdk, other 1.5 classes in gradle's classpath (starting with slf4j after I retro-wove gradle) arent able to be used.  I could take each one out and use retroweaver on them, but this would take a long time and I don't know anything about retroweaver anyway(yet, but I am very interested).  Let me know if you figure out a jdk 1.4-compatible gradle distribution or if I can help out.

-Jerod

On Thu, Jul 10, 2008 at 11:48 AM, Hans Dockter <[hidden email]> wrote:

On Jul 10, 2008, at 6:26 PM, Jerod Lass wrote:

Is there a way to run gradle with the 1.5 jdk but tell it to compile everything with a specific 1.4 jdk?

To Gradle compile task delegates to the Ant javac task. You can set most of the options via the Gradle task. Have a look at: http://ant.apache.org/manual/CoreTasks/javac.html

This task has the options fork an executable. So this looks pretty straight forward.


Even if only the ant task uses 1.4, it should work.  It's only the ant task that needs and IBM-specific 1.4 jdk.  Thanks

I don't see a way to execute an Ant task with a different JDK within the same JVM Gradle is running. I guess you have to use an external process for this. An ugly way of doing this would be to provide a build xml or a groovy script which calls the Ant task. You could call the script with the IBM JDK from your build.gradle file. Not very nice but it should work.

Providing a JDK 1.4 compatible Gradle looks like the easiest solution.

- Hans


--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: gradle with a 1.4 jdk

JerodLass
I'm still interested, but I solved my EJB problem a different way.


Jerod Lass wrote
 I am trying to use retroweaver to compile gradle, but since i am on a 1.4
jdk, other 1.5 classes in gradle's classpath (starting with slf4j after I
retro-wove gradle) arent able to be used.  I could take each one out and use
retroweaver on them, but this would take a long time and I don't know
anything about retroweaver anyway(yet, but I am very interested).  Let me
know if you figure out a jdk 1.4-compatible gradle distribution or if I can
help out.

-Jerod

On Thu, Jul 10, 2008 at 11:48 AM, Hans Dockter <mail@dockter.biz> wrote:

>
> On Jul 10, 2008, at 6:26 PM, Jerod Lass wrote:
>
>  Is there a way to run gradle with the 1.5 jdk but tell it to compile
>> everything with a specific 1.4 jdk?
>>
>
> To Gradle compile task delegates to the Ant javac task. You can set most of
> the options via the Gradle task. Have a look at: http://
> ant.apache.org/manual/CoreTasks/javac.html
>
> This task has the options fork an executable. So this looks pretty straight
> forward.
>
>  Even if only the ant task uses 1.4, it should work.  It's only the ant
>> task that needs and IBM-specific 1.4 jdk.  Thanks
>>
>
> I don't see a way to execute an Ant task with a different JDK within the
> same JVM Gradle is running. I guess you have to use an external process for
> this. An ugly way of doing this would be to provide a build xml or a groovy
> script which calls the Ant task. You could call the script with the IBM JDK
> from your build.gradle file. Not very nice but it should work.
>
> Providing a JDK 1.4 compatible Gradle looks like the easiest solution.
>
> - Hans
>
>
> --
> Hans Dockter
> Gradle Project lead
> http://www.gradle.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: gradle with a 1.4 jdk

diongillard
The best way to run certain IBM tasks is to use the supplied ws_ant
batch file or shell script.

That way the environment is set up for you and there's no jdk issues.

On Fri, Jul 11, 2008 at 5:17 AM, JerodLass <[hidden email]> wrote:

>
> I'm still interested, but I solved my EJB problem a different way.
>
>
>
> Jerod Lass wrote:
>>
>>  I am trying to use retroweaver to compile gradle, but since i am on a 1.4
>> jdk, other 1.5 classes in gradle's classpath (starting with slf4j after I
>> retro-wove gradle) arent able to be used.  I could take each one out and
>> use
>> retroweaver on them, but this would take a long time and I don't know
>> anything about retroweaver anyway(yet, but I am very interested).  Let me
>> know if you figure out a jdk 1.4-compatible gradle distribution or if I
>> can
>> help out.
>>
>> -Jerod
>>
>> On Thu, Jul 10, 2008 at 11:48 AM, Hans Dockter <[hidden email]> wrote:
>>
>>>
>>> On Jul 10, 2008, at 6:26 PM, Jerod Lass wrote:
>>>
>>>  Is there a way to run gradle with the 1.5 jdk but tell it to compile
>>>> everything with a specific 1.4 jdk?
>>>>
>>>
>>> To Gradle compile task delegates to the Ant javac task. You can set most
>>> of
>>> the options via the Gradle task. Have a look at: http://
>>> ant.apache.org/manual/CoreTasks/javac.html
>>>
>>> This task has the options fork an executable. So this looks pretty
>>> straight
>>> forward.
>>>
>>>  Even if only the ant task uses 1.4, it should work.  It's only the ant
>>>> task that needs and IBM-specific 1.4 jdk.  Thanks
>>>>
>>>
>>> I don't see a way to execute an Ant task with a different JDK within the
>>> same JVM Gradle is running. I guess you have to use an external process
>>> for
>>> this. An ugly way of doing this would be to provide a build xml or a
>>> groovy
>>> script which calls the Ant task. You could call the script with the IBM
>>> JDK
>>> from your build.gradle file. Not very nice but it should work.
>>>
>>> Providing a JDK 1.4 compatible Gradle looks like the easiest solution.
>>>
>>> - Hans
>>>
>>>
>>> --
>>> Hans Dockter
>>> Gradle Project lead
>>> http://www.gradle.org
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>   http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/gradle-with-a-1.4-jdk-tp18385565p18389946.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
dIon Gillard
There are only two kinds of programming languages: those people always
bitch about and those nobody uses. (Bjarne Stroustrup)

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: gradle with a 1.4 jdk

JerodLass
The IBM jdk isn't different at its core, I just made sure all of it's libraries were in the ant task's classpath.

diongillard wrote
The best way to run certain IBM tasks is to use the supplied ws_ant
batch file or shell script.

That way the environment is set up for you and there's no jdk issues.

On Fri, Jul 11, 2008 at 5:17 AM, JerodLass <kentalicekent@gmail.com> wrote:
>
> I'm still interested, but I solved my EJB problem a different way.
>
>
>
> Jerod Lass wrote:
>>
>>  I am trying to use retroweaver to compile gradle, but since i am on a 1.4
>> jdk, other 1.5 classes in gradle's classpath (starting with slf4j after I
>> retro-wove gradle) arent able to be used.  I could take each one out and
>> use
>> retroweaver on them, but this would take a long time and I don't know
>> anything about retroweaver anyway(yet, but I am very interested).  Let me
>> know if you figure out a jdk 1.4-compatible gradle distribution or if I
>> can
>> help out.
>>
>> -Jerod
>>
>> On Thu, Jul 10, 2008 at 11:48 AM, Hans Dockter <mail@dockter.biz> wrote:
>>
>>>
>>> On Jul 10, 2008, at 6:26 PM, Jerod Lass wrote:
>>>
>>>  Is there a way to run gradle with the 1.5 jdk but tell it to compile
>>>> everything with a specific 1.4 jdk?
>>>>
>>>
>>> To Gradle compile task delegates to the Ant javac task. You can set most
>>> of
>>> the options via the Gradle task. Have a look at: http://
>>> ant.apache.org/manual/CoreTasks/javac.html
>>>
>>> This task has the options fork an executable. So this looks pretty
>>> straight
>>> forward.
>>>
>>>  Even if only the ant task uses 1.4, it should work.  It's only the ant
>>>> task that needs and IBM-specific 1.4 jdk.  Thanks
>>>>
>>>
>>> I don't see a way to execute an Ant task with a different JDK within the
>>> same JVM Gradle is running. I guess you have to use an external process
>>> for
>>> this. An ugly way of doing this would be to provide a build xml or a
>>> groovy
>>> script which calls the Ant task. You could call the script with the IBM
>>> JDK
>>> from your build.gradle file. Not very nice but it should work.
>>>
>>> Providing a JDK 1.4 compatible Gradle looks like the easiest solution.
>>>
>>> - Hans
>>>
>>>
>>> --
>>> Hans Dockter
>>> Gradle Project lead
>>> http://www.gradle.org
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>   http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/gradle-with-a-1.4-jdk-tp18385565p18389946.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
dIon Gillard
There are only two kinds of programming languages: those people always
bitch about and those nobody uses. (Bjarne Stroustrup)

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

RE: gradle with a 1.4 jdk

Detering Dirk-2
> The IBM jdk isn't different at its core, I just made sure all
> of it's libraries were in the ant task's classpath.

The IBM jdk istn't different at its surface  ;-).

Once you did trickier things with the library classes,
e.g. in Swing, you may be surprised why your app behaves
differently on IBM than on SUN platform.


***********************************************************************

Die Information in dieser email ist vertraulich und ist ausschliesslich
fuer den/die benannten Adressaten bestimmt. Ein Zugriff auf diese
email durch andere Personen als den/die benannten Adressaten ist
nicht gestattet. Sollten Sie nicht der benannte Adressat sein, loeschen
Sie bitte diese email.

***********************************************************************

BITMARCK Software GmbH
Paul-Klinger-Strasse 15, 45127 Essen
 
Amtsgericht Essen HRB 20680
Geschaeftsfuehrer: Frank Krause, Andreas Prenneis


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: gradle with a 1.4 jdk

Andrew Schetinin
In reply to this post by JerodLass
Hi,

I've come across this thread about running Gradle with IBM JRE 1.4.2, an would like to vote for this feature too.
I wanted trying Gradle, but one of my destination platforms is AIX 5.1 which only has JRE 1.4.2 officially supported.

Regards,

Andrew
Reply | Threaded
Open this post in threaded view
|

Re: gradle with a 1.4 jdk

hans_d
Administrator
Hi Andrew,

On Jul 18, 2008, at 9:31 AM, Andrew Schetinin wrote:

> Hi,
>
> I've come across this thread about running Gradle with IBM JRE  
> 1.4.2, an would like to vote for this feature too.
> I wanted trying Gradle, but one of my destination platforms is AIX  
> 5.1 which only has JRE 1.4.2 officially supported.

The plan is to release 0.3 with an additional JDK1.4 compatible  
distribution. The plan is also to release 0.3 this month.

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email