Copile JDK1.4.2_10 & run with JDk1.3

Posted on 2006-03-20
Last Modified: 2012-05-05
Dear Experts

We used the JDK1.4.2_10 when we build our product. But when we move to production by mistake the JAVA_HOME was pointed to JDK1.3. We application contains Servlets, EJBs etc.

is there any possibility to get the issues?


Question by:krishnasaikarthik
    LVL 92

    Accepted Solution

    suggest either shifting production to 1.4.2
    or shifting development to 1.3
    LVL 92

    Expert Comment

    you can also use -target 1.3 compile option to produce 1.3 compatible class files but you could still have incompaibilities.
    LVL 30

    Assisted Solution

    Is it possible to change the JAVA_HOME in production? If not, you can compile on 1.4 with the -target 1.3 option to compile it to 1.3 version but that would also involve changing the deployed JARs, so at some or the other point the production system has to be brought down for a moment. The easier option is to bring it down for a smaller time, change the JAVA_HOME and then restart the application.
    LVL 30

    Expert Comment

    >> is there any possibility to get the issues?

    If you have used any methods/ classes which were introduced in 1.4, then yes. Otherwise it should be ok.
    LVL 10

    Assisted Solution

    You most likely will end up getting an UnsupportedClassVersionError at runtime.
    Also, some of the API used in 1.4 might not be available in 1.3. So, you might
    have serious problems.

    LVL 23

    Assisted Solution

    i think if you are not using any java 1.4 Api you may not have any problem but even if you have any serialized components you may get serialization mismatch error.
    and about the web side if you have used j2ee 1.3 with jdk 1.4 and now shifting only the jdk from jdk 1.4 to jdk1.3. no much diffrence may be seen as J@EE is the same yet.
    LVL 12

    Assisted Solution

    >by mistake the JAVA_HOME was pointed to JDK1.3
    Correct this wrong pointing.
    If you use Unix/Linux/Aix you can create a virtual directory pointing correctly.
    Bye, Giant.

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Suggested Solutions

    Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now