jre 1.6 with GWT - gwt

I have an application written in GWT 1.4 I am all set to up grade it to GWT 1.7/2.0 Before starting i just want to confirm that GWT 1.7.1 above versions supports jre 1.6??

From version 1.5 of GWT you can now use the Java 5.0 (JDK 1.5) language constructs as well, e.g. generics, enums. This means that you have a much greater chance of sharing code between the client and server sides of your application, if the server-side is written in Java.
The JRE Emulation Library of GWT supports more methods and has been updated with generics support. But it is still not a complete implementation of the JRE standard library, e.g. no BigDecimal, no file support, etc.
Having said all of that, I am not sure exactly what you mean by "supports jre 1.6"?

GWT. 2.0 requires 1.5 or later. Refer to http://code.google.com/webtoolkit/gettingstarted.html
I have been running with 1.6 for a while now with no issue.

Related

GWT: Jetty version in dev mode

I have two questions:
1. Which Jetty version is used by GWT 2.5.1 in dev-mode?
2. Is there a way to change this version?
6.1.11 (source: https://gwt.googlesource.com/gwt/+/2.5.1/dev/build.xml)
Note that 2.6 and 2.7 use Jetty 8.1.12.v20130726, and 2.8 uses Jetty 9.2.14.v20151106
Yes, you can implement a ServletContainerLauncher that starts another version of Jetty. Beware of classpath conflicts though! (but I suppose you'll want to use a recent version and the new versions use org.eclipse.jetty rather than org.mortbay.jetty as a root package so there shouldn't be any problem (with the old GWT pre-2.6).
FYI, gwt-dev will be split into several JARs in the next version of GWT (or maybe the one after that) and the dependency on Jetty will be moved to an optional JAR, and will possibly be updated as well. (note though that GWTTestCase also depends on Jetty)
EDIT: this finally happens with GWT 2.8, but Jetty is needed for SDM (CodeServer) and Jetty has a bad track of backwards compatibility.

How to Get JSF 2.0 Working with Eclipse 3.5 and JBoss 5.1

I am running Eclipse 3.5 and JBoss 5.1. I want to create a JSF 2.0 project.
I heard here that the Eclipse JBoss Tools plugin version 3.1 (available here) could do this for me.
I have installed the plugin. However, if I go to the Project Facets properties page for a Dynamic Web Project, I only see Facets for JavaServer Faces 1.1 and 1.2. My Java facet is set at 6.0, and my Dynamic Web Module to 2.5.
In the Targeted Runtimes properties page, I see that I am targeting the JBoss 5.1 Runtime.
I understand that Eclipse Helios will be here next week, but I'm curious if its possible to get JSF 2.0 working with 3.5. Any thoughts?
Certainly you can. Just set to 1.2, give the JSF 2.0 libraries and it will work. It's after all just the code which you write. You'll maybe only miss the IDE assistance in JSF 2.0 specific features, but this doesn't harm if you know how to write code yourself. Heck, you can even do this all using plain notepad.exe and javac.exe ;)
See also:
Does the Eclipse IDE support JSF 2.0?

Does the Eclipse IDE support JSF 2.0?

I have the WTP 3.1 plugin installed and have also installed the Glassfish v3 plugin. I am able to register my server.
When I create a dynamic web project, I can see that the maximum dynamic web module version available is 2.5. I then choose the default configuration for Glassfish v3 but, when I look at it JSF, it is not selected by default. When I select it, the maximum version available is 1.2.
I want to use JSF with facelets - does Eclipse support this? I can't seem to find anything helpful on the Eclipse WTP site.
Java EE 6 / JSF 2.0 is relatively new. Most tools are already ready, but Eclipse has to catch up it yet.
The status as far:
IntelliJ Ultimate Edition was early in this. Unfortunately not freeware. Note: the free Community Edition doesn't provide tools for much of Java EE, let alone JSF.
Netbeans 6.8 came a bit later almost full Java EE 6 support, including JSF 2.0.
Eclipse for Java EE planned to support Facelets in Galileo, but it was cancelled and postponed to the successor Helios which is currently in one of its latest Release Candidate stages been released at 24 July 2010. Helios for Java EE will ship with full fledged Java EE 6 support, including JSF 2.0.
As of now, it just works fine in Eclipse Ganymede/Galileo when you select JSF 1.2 and uses JSF 2.0 libraries. You'll only miss some code assistance which may be useful for JSF 2.0, but you can write code as good yourself.
Use Eclipse with JBoss Tools Plugin. It has support for JSF2 and CDI.
http://in.relation.to/14750.lace
Note, that you can do JSF 2.0 development in Eclipse, but not with as much tool support as might come later.
You can always edit xhtml files directly as XML-files (and have the namespaces registered), and have Glassfish deployments. I've done that, with stock Eclipse 3.5.2 Java EE edition, and the Glassfish plugin.
Have a read on http://weblogs.java.net/blog/2009/05/18/using-ide-write-jsf-20-app
It describe in details on how to setup your eclipse for jsf 2.0 development.

Why does NetBeans still use JDK 1.5?

This question has always bothered me. And the NetBeans wiki does not say anything about that... Besides, JDK 1.5 will complete the End of Life process very soon and 1.6 has been around for quite a while.
So why do they still use version 1.5 even if 1.6 is available on all Netbeans-supported platforms?
The NetBeans team requires JDK 1.5 to ensure that the resulting jars will run on a 1.5 JVM.
You don't need to build it with JDK 1.5 if it's just for your own use. But if you're planning on developing modules, you'll need to use 1.5 to ensure everyone else can use your modules.
If you compile with 1.6, you can use the -target 1.5 to generate classes that will load into a 1.5 JVM. The downside is it will not prevent you from using classes or methods introduced in 1.6 (eg: StringBuilder). It will load in a 1.5 JVM, but will fail with the likes of ClassNotFoundException, NoSuchMethodErrot, or NoSuchFieldError.
I've only used Netbeans a few times, but I know you can download Netbeans 6.7 with the latest version of the Java SE 6 SDK (6u14).
Unless you meant with the Java EE 5 SDK. J2EE 5 is just a specification, implemented by Sun's GlassFish stack, Jetty, Apache Geronimo (and partly by Apache Tomcat), etc...
Sun's Java EE 5 SDK is just the Java SE 6 SDK with the GlassFish application server and other optional downloads that implement other parts of the specification.

Codebase of Eclipse using generic

Do anyone know when Eclipse plans to move its codebase to > 1.5 (i.e. using generic & annotation)?
Even the latest plan for the upcoming eclipse 3.6 Helios still mentions:
Most of the Eclipse SDK is "pure" Java code and has no direct dependence on the underlying operating system. The chief dependence is therefore on the Java Platform itself.
Portions are targeted to specific classes of operating environments, requiring their source code to only reference facilities available in particular class libraries (e.g. J2ME Foundation 1.1, J2SE 1.4, Java 5, etc).
In general, the 3.6 release of the Eclipse Project is developed on a mix of Java 1.4, Java 5 and Java 6 VMs.
As such, the Eclipse SDK as a whole is targeted at all modern, desktop Java VMs.
Most functionality is available for 1.4 level development everywhere, and extended development capabilities are made available on the VMs that support them.
So as long as they want to support platforms with an old JDK, the incentive to rewrite a large portion of the codebase in recent JDK is low.
Note: e4 (Eclipse 4.0) will be based on Java 5.
In general, the 1.0 release of the e4 Project is developed on Java SE 5.
Some of Eclipse codebase (the Java EE part) is already using 1.5 level. As for the rest of it, I don't think they have any plans - I doubt if it is worth the effort.
More here -> http://www.eclipse.org/downloads/moreinfo/jre.php