Migrating code from JDK 1.5 to 1.6

What are the steps you need to follow to migrate your code from JDK 1.5 to 1.6.

The following steps followed:

  • Changed project build fix as JDK1.6
  • Compiler changed as 6
  • Clean and deploy project
  • I was getting a compilation error like
  *** ERROR ***: Thu Apr 01 05:17:06 PDT 2010 org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException: WEB-INF / web.xml
     Stack trace of nested exception:
     java.lang.ClassCastException: org.eclipse.jst.javaee.web.internal.impl.WebAppDeploymentDescriptorImpl cannot be cast to org.eclipse.jst.j2ee.webapplication.WebApp
         at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.War22ImportStrategyImpl.loadDeploymentDescriptor (War22ImportStrategyImpl.java:87)
         at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.War22ImportStrategyImpl.importMetaData (War22ImportStrategyImpl.java:81)
         at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.getDeploymentDescriptor (WARFileImpl.java:145)  



 *** ERROR ***: Thu Apr 01 05:17:06 PDT 2010 org.eclipse.wst.validation.internal.core.ValidationException: CHKJ3000E: WAR Validation Failed: org.eclipse.jst.j2ee.commonarchivecore.internal. exception.DeploymentDescriptorLoadException: WEB-INF / web.xml
         at org.eclipse.jst.j2ee.model.internal.validation.WarValidator.validateInJob (WarValidator.javahaps43)
         at org.eclipse.jst.j2ee.internal.web.validation.UIWarValidator.validateInJob (UIWarValidator.java:111)
         at org.eclipse.wst.validation.internal.operations.ValidatorJob.run (ValidatorJob.java:75)
         at org.eclipse.core.internal.jobs.Worker.run (Worker.java:55)
+6
java eclipse
source share
7 answers

In the vast majority of cases, you don’t have to do anything at all. Even recompilation is not strictly necessary.

Several incompatibilities that exist between Java 5.0 and 6.0 are described in the JDK 6 Adoption Guide .

+15
source share

Code that runs on Java 1.5 will work without changes to 1.6 (in which you did not use any internal APIs). Public Java api is always compatible with Outlook.

+2
source share

Recompile the new JDK, check the warnings (maybe some of the classes or methods are deprecated), check if the application works as expected.

+1
source share

Download and install JDK 6. Update any environment variables such as JAVA_HOME, JDK_HOME. Make sure your IDE points to a new library (most IDEs will do this automatically if restarting after updating environment variables). Update your project settings to use JDK 6 in your IDE for each project, respectively.

0
source share

It depends on your application. I believe that here the list of new functions for 1.6 of all your codes should work fine.

link Features of java 1.6

0
source share

I did the following and it works great

Changed the build Patch of Project as JDK1.6 Changed the Compiler as 6 
0
source share

I fixed a similar error by replacing:

 <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> 

from:

 <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> 

When I made this replacement in web.xml, this CHKJ3000E was gone.

0
source share

All Articles