Why does NetBeans still use JDK 1.5? - netbeans

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.

Related

Can't install glassfish server in eclipse oxygen

Hi I am using Eclipse Oxygen in Ubuntu 18.4 with Oracle Java 10. I tried to install glassfish server in Eclipse but failed. every time I tried it said java development kit is required instead of JRE. I had given the path "/usr/lib/jvm/java-10-oracle". Even if I put the path as "/var/cache/oracle-jdk 10-installer/",it says "Java installer not found in the specified folder". i am putting the two screenshots here for your reference. Please help.Here are the 2 screenshots for the above two cases
[Note that in this answer I am assuming you are using GlassFish 5.0, which is the latest version]
GlassFish will not currently work on Java 10 due to the JPMS (module system). You need to use Java 8 instead.
You should also be aware that you need specifically Java 8u161 or lower for GlassFish, but the latest release of Java 8 can be used with Payara Server which will work in the same way as GlassFish.
If you really need to use GlassFish on a version of Java 8 higher than u161, then you can use the latest 5.0.1 nightly build

Migration JBoss EAP 4.2 from java 1.5 to java 1.8?

right now my app use 4.2 jboss with java 1.5.
I manage to build my app (EJB, jsf, hibernate, seam) with java 1.8, but i get some problems with running jboss 4.2 with java 1.8.
So I wonder, whether it is even possible or it will be better to switch to another version of jboss(with will be also complicate)?
Thank you for clarification.
So another question appear, if I use new jboss and java8 , Am I need to change hibernate (eg. I use hibernate-ejb 3.3.2ga), jsf, etc. to newer version? Application was build with java 8 with success.
You can't run JBoss EAP 4.2 on Java 1.8 (Or any other java newer than 1.6)
Use new version of JBoss EAP instead. This will give you better performance some cool new features and server will be easier to monitor and maintain.
Here is the link

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.

jre 1.6 with 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.

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