-3

My current project is built on Java 6. I'm thinking of upgrading it to Java 8. Here is the details of the build.properties

xdoclet.home=D:/**/xdoclet-1.2.3
jboss.deploy.dir=D:/**/jboss-6.1.0.Final
application.dir=D:/**/**/cal
middlegen.home=D:/**/middlegen-2.0-b1
compiler.home=C:/Program Files/Java/jdk1.6.0_24/bin/javac .

I've tried building the project on JDK 8 and it is building successfully. I know that I have to upgrade every libraries so that it can work with JDK 8.

How can I make sure about the dependencies to be correct as there are so many jars? And also Do I have to change my Jboss Application Server to Wildfly Application Server as Jboss AS 7 doesn't support JDK 8?

Please suggest how to approach. Any help appreciated.

And also let me know if it's better to build the project from Scratch in JDK 8 than upgrading it to JDK 8.

  • Have you even tried running it with Java 8? Java is generally very well backwards compatible. Even JBoss which may not be officially supported with 6.1.0 on Java 8 will probably run fine. But if any of your libraries are from a vendor that supports them, you should check whether their current versions are supported on Java 8. That's manual process. – Erwin Bolwidt Sep 30 '16 at 05:44
  • @ErwinBolwidt: Yes I am able to build the project with jdk 8. But Do I also have to upgrade the ant, middlegen and xdoclet libraries? – Manoj Kumar Giri Sep 30 '16 at 05:57
  • Ordinarily not. Why don't you just try to run your automated test suite against the code in jdk8? That should give you a pretty good indication whether you will have any trouble. But it's not a bad idea to upgrade versions of libraries on a regular basis, as bugs will be fixed in newer versions. Again, your automated regressions tests well help you see if that causes any problems. – Erwin Bolwidt Sep 30 '16 at 07:01

2 Answers2

1

1) If you need to use jdk8 than you have to switch too the newer jboss. 2) It is not required to updated all jar's since jdk8 can run older jars it there is no compatibility problem. 3) If you already have an large probject it is faster to keep it. 4) You can review your code and use the new java 8 features like "<>" and "try()"

For more qualified answer your question is to unspecific.

SkateScout
  • 815
  • 14
  • 24
1

I would like to suggest you to update JBOSS 6 to wildfly 8 if there is a change required for the updation of JDK 6 to JDK 8.

But there is some other way!!! you can run your JBOSS 6 externally and add the the project.war file in JBOSS>>standalone>>deployment.

For Upgrade of JDK 8,i would suggest to go through JDK 8 feature and see where you can implement the new feature of java in your source code and have a mock testing class for the same.Make sure you have a mock project as it is the good practice for the enhancement of the project.

Abdul Hadee
  • 113
  • 6