How to debug when porting from Java 1.5 to 1.6?

I have a distributed JBoss-based application that exhibits erroneous behavior when compiling and starting using Java 1.6. It shows another error when compiling with Java 1.5 and starts with Java 1.6. But it works great when compiling and starting with Java 1.5. What is the best approach to debugging this application? Is there a volt for converting Java 1.5 to 1.6?

Of course, the behavior also depends on the third-party libraries that I use. I am using JBoss 4.0.3 (and several other libraries too!), Which I understand is a rather old version. Before moving on to upgrading the version of JBoss, I want to make sure that the problem is not related to my code.

+3
source share
2 answers

Depending on the size of the application and the complexity of its calls in third-party libraries, you can do this. Write layout methods that actually return the value returned by third-party library calls and compile / run it using both versions of Java. This way you can be sure that your code is not doing anything wrong. I know that this is the most painful way :). But if you already have unit tests for this application, you may need to make small changes around it.

+1
source

First of all, make sure that you are running the latest version of Java 6. If you are using Sun Java, Update 10 has changed a lot of things, and the patches are still fixed in future releases.

-, JBoss, Java 6.

, . , - Java 6 Java 5 - , .

+1

Source: https://habr.com/ru/post/1728880/


All Articles