从Java 1.4升级到JAVA 6 SE [英] Upgrading from Java 1.4 to JAVA 6 SE

查看:118
本文介绍了从Java 1.4升级到JAVA 6 SE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在从JAVA 1.4升级到JAVA 6 SE。某些方法和类已被弃用,或者由于效率低下而出现大量警告。我想知道是否可以升级而不对我的代码进行任何更改,并在更改远程调试之后修复错误。如果有更简单或更有效的方法,请分享。

I am currently upgrading from JAVA 1.4 to JAVA 6 SE. Some of the methods and classes have either been deprecated or there are a lot of warnings due to inefficient practices. I want to know if it is possible for me to upgrade without making any changes to my code and after the changes remote debug to fix the errors. If there's a simpler or more efficient way of doing this please share.

推荐答案


我想知道如果我可以升级而不对我的代码进行任何更改,并在更改远程调试后修复错误。

I want to know if it is possible for me to upgrade without making any changes to my code and after the changes remote debug to fix the errors.

我们不能给你一个肯定的肯定或否定。

We can't give you a definitive yes or no to that.

首先,应该注意的是,大多数弃用和警告都可以忽略。 (有些人告诉你应该尽快修复的事情,但是最糟糕/危险的API最令人震惊的例子早在Java 1.4之前就被弃用了)

First, it should be noted that most of the deprecations and warnings can be ignored to start with. (Some are telling you about things that should be fixed soon, but the most egregious examples of bad / dangerous APIs were deprecated long before Java 1.4)

所以我们可以找到一个理由不能给你一个明确的答案是我们不知道你看到了什么警告(呃!)。

So one reason we can't give you a definitive answer is that we don't know what warnings you are seeing (duh!).

另一个原因是我们不知道如何你的测试套件是好的/广泛的。如果你有一个好的测试套件,那么任何问题都将被提升的可能性很大。如果没有,或者如果您依赖于手动测试,那么您发现升级导致的任何问题的机会将大大减少。

The other reason is that we don't know how good / extensive your test suite is. If you have a good test suite, the chances are good that any problems will be picked up. If not, or if you are relying on manual testing, then your chances of finding any problems cause by the upgrade are greatly reduced.

另一点需要注意的是,每个主要Java版本的文档都包含有关新版本与上一版本之间不兼容性的部分。最好至少略读这些文档,看看突出显示的任何问题是否可能对您的申请产生影响。

The other thing to note is that the documentation for each major Java release includes a section on Incompatibilities between the new release and the previous one. It is a good idea to at least skim these documents to see if any of the issues highlighted are likely to impact on your application.

最后,大多数人发现升级不会导致大量问题。当然也有例外。如果你习惯于依赖于实现特定的行为,而不是javadocs所说的话,那就会导致痛苦。

Finally, most people find that upgrading doesn't result in a large swath of problems. There are exceptions of course. And if you are in the habit of depending on implementation specific behaviour rather than what the javadocs say, THAT can lead to pain.

这篇关于从Java 1.4升级到JAVA 6 SE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆