Running Jetty 9 on Java 6 - java

I work for a corporation that won't upgrade from JRE 6 to JRE 7 on our servers. I have successfully developed some code that works on JRE 7 using Jetty 9. However, I can't run this code on the corporation server. I was wondering if anyone out here knew of a way to run Jetty 9 on JRE 6. I specifically need the HTTPConfiguration class from Jetty 9.
The only potential thing I can think of would be to download Jetty, set it to a 1.6 compliance and work from that. I'm really hoping (with a shot in the dark) that someone has a better idea.

No, Jetty 9 required Java 7 since the servlet api (servlet 3.1) requires Java 7. While 9.0 could have in theory worked on Java 6 our intent had been that 9 would be servlet 3.1 and it wasn't until 9.1 that we made the servlet api switch...which was mostly due to timing issues more than anything.
[update] Jetty 9.2.x is Java 7 and Jetty 9.3.x onwards will require Java 8. This is largely due to requirements of supporting the HTTP/2 protocol which Jetty 9.3.x does...in spades.

Related

which tomcat version is suitable for java 8

Recently, our online web service using tomcat 7.0.23.0 and JVM 1.7.0_51-b13 need to upgrade to java 8, which tomcat version is suitable for java 8 ?
See this link
http://tomcat.apache.org/whichversion.html
for details about which tomcat versions are supported on which java versions.
According to that link, tomcat 7.0.23.0 should work on java 8
Tomcat 7 is good and works well for Java 8 however, not recommended for Java8 as all features of Java 8 were not supported in tomcat 7.
Please use tomcat 9.x with Java 8 (Recommended from Tomcat Apache)
Please refer http://tomcat.apache.org/whichversion.html
Latest stable version supported on Java 8 is Tomcat 10 but the users of Tomcat 10 onwards should be aware that, as a result of the move from Java EE to Jakarta EE as part of the transfer of Java EE to the Eclipse Foundation, the primary package for all implemented APIs has changed from javax.* to jakarta.*.

Does Tomcat 8 on Java 8 support applications built for Java 6 and Tomcat 6?

My organization is migrating from a Java 6 / Tomcat 6 environment to a Java 8 / Tomcat 8 environment.
I would like to keep things simple on my development box by setting up as follows:
Java 6 and Java 8 installed on the box.
Java 8 as the default version of Java.
Tomcat 8 as the application server, running on Java 8.
Eclipse with two workspaces, one configured for Java 6 and one for Java 8, both deploying on the Tomcat 8 server. The idea is to use the Java 6 workspace for maintenance work so that I can deploy on the old Java6/Tomcat6 server, and to use the Java 8 workspace for new and migrated work.
I would swear I did exactly this without thinking in my prior development box (that died of hardware failure) and that I experienced no problems at all, but I am not certain.
Is this a reasonable setup?
If it is supposed to work, is it because the application is working in a backward compatible mode?
Input would be greatly welcome. I've been hunting all over the web unsuccessfully. Thanks.
See the tomcat link for compatibility as follows :
http://tomcat.apache.org/whichversion.html
tomcat 8 on java 8 will definitely support applications built for java 6 and tomcat 6. I saw code where they are using a code from jdk 1.2 which runs on jdk 6 and tomcat 7.
Few exceptions would be some deprecated methods if you have used in earlier versions of java which will not be supported as it may be removed from newer version of java.
Also if you use third party libraries, you may need to maintain java version compatibility among them.
Otherwise it should work perfectly fine.

Jboss 7 need alternative JRE

Have a problem. Before start server jboss 7.1.1, I have a problem:
**Error:** JDK 1.7 (or earlier) should be specified either as project SDK or
alternative JRE
I am using jdk 1.8 In project. And I can use only 1.6 JRE for working with JBOSS.
If I used 1.8 at project, and 1.6 jre with jboss, I take error with unsupported major.minor version 52.0.
Can I change jdk for JBOSS on 1.8? And how to do it?
I found the posting below on the JBoss developer developer forum.
The short version is that you would need to backport various bug fixes to JBoss AS 7 in order to get it run on a Java 8 JRE. It would be better / easier to upgrade to Wildfly. (He says.)
Re: AS 7 on Java 8 by Tomaz Cerar Apr 8, 2015 6:18 AM (in response to Matija Vizintin)
Any big reason you cannot upgrade to WildFly 8?
Core issue that prevents boot of AS7 on JDK8 is
https://issues.jboss.org/browse/WFLY-2057
which was fixed by
https://github.com/wildfly/wildfly/commit/fa93ceff49c3e84851cb8b00157e4fbed1d2cdb7
You could apply this commit to
https://github.com/wildfly/wildfly/releases/tag/7.2.0.Final-testsuite-fix
tag and rebuild it.
but, this will only make sure server starts on JDK8, there ware
handful of other fixes / changes that we needed to address to make
sure testsuite passes properly.
In any case, i would recommend you to go with WildFly 8.2.0.Final.

Which is the minimum supported Java Version of Spring 4

I recently one of my projects to Spring 4.0.0.RELEASE
After deploying the project to my staging environment, I recognized an Exception with the following Message: bad major version at offset=6. My assumption is, that Sping 4 is not working with Java 6 (which I am forced to, because I can not change it on the system)
(Actually I even was not aware, that a JAR is depending on the Java Version)
Christian Rockrohr My assumption is, that Sping 4 is not working with Java 6
This is wrong assumption.
Spring requires JVM 1.6 or higher, as of Spring 4.0. *****
Java 8 (as well as 6 and 7)
Spring remains compatible with older versions of Java and the JDK: Concretely, Java SE 6 (specifically, a minimum level equivalent to JDK 6 update 10, as released in late 2008) and above are still fully supported. However, for newly started development projects based on Spring 4, we recommend the use of Java 7 or 8.
Read also:
java.lang.UnsupportedClassVersionError: bad major version at offset=6
This look like running a Spring 4 application with JDK 1.5.
Confirmed:
Christian Rockrohr: Indeet, there is Java 1.5 installed on my AS400, it is not Java 1.6. That's is the reason, why Spring did not work. I just returned to Spring 3.1.0.RELEASE and it worked.
*****) http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/JdkVersion.html
jdk 1.6 update-18 or above(latest in 1.6 jdk is jdk-6u-45) versions will support spring 4.0
An exception like this
java.lang.UnsupportedClassVersionError: bad major version at offset=6
Will occure when code is compiled for java version 6, but one try to run it with java 5.

What version of apache tomcat supports java 7 features in netbeans?

I'm using Netbeans 7.2 with apache tomcat server of version 5.5.It is not supporting java 7 features and asking to set server level to 7? how can i do that? or should i use other server?which one will u recommend?
Apache Tomcat 7 does work with Java 7. You can check Tomcat 7 latest changelog at http://tomcat.apache.org/tomcat-7.0-doc/changelog.html
Note: Most of the times, it's good to start your development with latest server available (unless you have a very specific version requirements)
There is no Tomcat version that support Java 7 currently.All the currently supported Apache Tomcat versions (5.5.x, 6.0.x and 7.0.x) are known to run correctly on Java 6.

Categories

Resources