GWT 2.4 breaks JDK 5 compile support

832 views
Skip to first unread message

Lars Ködderitzsch

unread,
Sep 14, 2011, 3:04:54 AM9/14/11
to Google Web Toolkit
It seems that gwt-user.jar in GWT 2.4 packages a certain dependency
(flute-1.3-gg2.jar) which is compile against target 1.6.

This breaks GWT compile support for JDK 5, which I suppose was not
intendend (even though JDK 5 support is deprecated).

Please have a look at bug 6790:

http://code.google.com/p/google-web-toolkit/issues/detail?id=6790

My current workaround is to provide a rebuilt version of flute into my
GWT compile classpath, before gwt-user.jar.

BR,
Lars

Lars Ködderitzsch

unread,
Sep 14, 2011, 10:39:37 AM9/14/11
to Google Web Toolkit
Doing the flute.jar workaround triggered another JDK 1.5 compatibility
issue further down the road:

[INFO] [ERROR] Unexpected internal compiler error
[INFO] java.lang.NoSuchMethodError: java/util/Arrays.copyOf([II)[I
[INFO] at
com.google.gwt.dev.jjs.impl.JsFunctionClusterer.exec(JsFunctionCluste
rer.java:153)

Here a Java 6 introduced API is being used, that I could only
workaround by locally patching the affected GWT class.
After that GWT compile worked fine again on a Java 5 JDK.



Jens

unread,
Sep 14, 2011, 12:39:45 PM9/14/11
to google-we...@googlegroups.com
Not quite sure if JDK 5 is just deprecated as of GWT 2.4 or if its already unsupported.

Taking a look at http://code.google.com/p/google-web-toolkit/source/browse/releases/2.4/eclipse/README.txt shows that you should set the compiler compliance setting to 1.6 which is only possible if you have JDK 6 and not JDK 5.

-- J.

Lars Ködderitzsch

unread,
Sep 14, 2011, 1:31:36 PM9/14/11
to Google Web Toolkit
Well, neither the SKD release notes (http://code.google.com/intl/de-DE/
webtoolkit/release-notes.html#Release_Notes_Current) nor the "What's
new" page mention dropping Java 5 support - as I would expect from a
change of this magnitude.

This leads me to believe that those issues are not intentional.

Let's see if someone (from the committers?) can clarify this.

BR,
Lars

ciosbel

unread,
Sep 14, 2011, 2:42:31 PM9/14/11
to google-we...@googlegroups.com

Jeff Larsen

unread,
Sep 14, 2011, 5:47:40 PM9/14/11
to google-we...@googlegroups.com
Yea, 1.6 is required now. Good riddance to 1.5!

Eric Clayberg (Google)

unread,
Sep 14, 2011, 9:03:57 PM9/14/11
to google-we...@googlegroups.com
Support for JDK 1.5 was indeed deprecated when GWT 2.2 was released. According to the release notes...

Version 2.2 will have only deprecated support for Java 1.5, resulting in warnings when building applications. While Java 1.5 will still work for at least the next release of GWT, developers should upgrade their version of Java to correct these warnings and ensure compatibility with future versions of GWT.

While we indicated that JDK 1.5 would work for "at least the next release" (e.g., GWT 2.3), there was no implied promise that JDK 1.5 would work in GWT 2.4 and beyond. The simple fact is that supporting JDK 1.5 was a significant burden and was holding us back. JDK 1.5 was originally released seven years ago, and entered end-of-life more than three years ago. For GWT 2.4 (and beyond) we were not focused on JDK 1.5 compatibility at all so various incompatibilities (big and small) started to enter the product and will no doubt accelerate in the future (for example, APT support actually requires JDK 1.6). While you might be able to temporarily hack JDK 1.5 support back into parts of GWT, it would only be temporary and equivalent to sticking your finger in the dike. Sorry.

Lars Ködderitzsch

unread,
Sep 15, 2011, 1:44:08 AM9/15/11
to Google Web Toolkit
Thanks for the clarification, I sure do understand all of that - even
though it's also a fact that in corporate wonderland Java 5 is still
the rage (and building with a higher JDK as the target runtime also
has its intricacies).

Yet, a more formal announcement would have been nice and the docs
should be updated to state the new 1.6 requirement prominently.
In fact (parts of) the documentation (e.g.
http://code.google.com/intl/de/webtoolkit/gettingstarted.html) still
mention only Java 5 SKD as requirement.

I suppose this question will continue to come up, as GWT 2.4 adoption
increases - but at least I am clear now :-)

Thanks,
Lars

PS: you may close the mentioned tracker issue (http://code.google.com/
p/google-web-toolkit/issues/detail?id=6790 ) as you see fit.

Thad

unread,
Sep 15, 2011, 12:05:09 PM9/15/11
to Google Web Toolkit
Right, good riddance to 1.5 so long as your not stuck supporting a few
die-hards with old Macs as servers. Apple didn't port Java 1.6 to the
old non-Intel RISC machines.If a site's server runs OSX 10.4 or below,
or it's a non-Intel machine with OS 10.5, GWT 2.4 is not an option.

God help us when Java 1.7 is required. I was never happy with the
Blackdown port for Linux. Therefore I'm not confident that OpenJDK
will provide a suitable environment for OSX down the road. The fact
that I develop almost exclusively in Java these days is what keeps me
from making a Mac my next computer.

cri

unread,
Sep 15, 2011, 12:46:58 PM9/15/11
to Google Web Toolkit
Time to bring your guys up to date, I'd say, and off the antiquated
mac servers. ;-) Actually I didn't know people used Macs as
servers. ;-)

Jeff Larsen

unread,
Sep 15, 2011, 1:33:35 PM9/15/11
to google-we...@googlegroups.com
You're not required to have a java 1.6 server to run with gwt compiled 1.5 code. You'll just have to setup a no-server situation. That way your 1.5 server code can live in a 1.5 environment and you compile your js with java 1.6


David Goodenough

unread,
Sep 15, 2011, 2:05:27 PM9/15/11
to Google-We...@googlegroups.com
On Thursday 15 Sep 2011, Thad wrote:
> Right, good riddance to 1.5 so long as your not stuck supporting a few
> die-hards with old Macs as servers. Apple didn't port Java 1.6 to the
> old non-Intel RISC machines.If a site's server runs OSX 10.4 or below,
> or it's a non-Intel machine with OS 10.5, GWT 2.4 is not an option.
>
> God help us when Java 1.7 is required. I was never happy with the
> Blackdown port for Linux. Therefore I'm not confident that OpenJDK
> will provide a suitable environment for OSX down the road. The fact
> that I develop almost exclusively in Java these days is what keeps me
> from making a Mac my next computer.
This should be much less of a problem now as OpenJDK is the only
official JDK for 7. I have no idea whether there is a version for
MACs, but it is now all properly open source so if you need to make
a version for old machines then it is open for you (and others) to
do so.

David

stuckagain

unread,
Dec 15, 2011, 7:17:29 AM12/15/11
to google-we...@googlegroups.com
The documentation getting started still says JDK 1.5 ... at the start of the page.
The release note does not say that Java 6 is REQUIRED.
 
 
A lot of servers are still using Java 5.
 
David
Reply all
Reply to author
Forward
0 new messages