JDK Compatibility

It may be a basic question but I am still unfamiliar with this thing.

This is about jdk compatibility. For example, if I used jdk 1.6 to develop my application. It definitely may fail in jre 1.5 since it may not have the necessary libraries i.e. javax.swing.GroupLayout. Forcing the user to update its jre is also not a good idea as most users may not be familiar on what jre is (ESPECIALLY in Windows where you can have multiple JRE and things are getting messy).

If I develop in jdk 1.4 or lower, then I deploy it in jre 1.5 or jre 1.6, it WILL work fine but there may be some methods that have been deprecated (it could happen) i.e. stop(), suspend() in Thread.

So what would be the best idea? I think that it is better to stick with 1.4. At least you only get the deprecated method :/

David
LVL 16
suprapto45Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
CEHJConnect With a Mentor Commented:
>> I think that it is better to stick with 1.4.

Yes ;-)
0
 
CEHJCommented:
You're not very likely to get methods deprecated between 4 and 6
0
 
suprapto45Author Commented:
But deprecated means that it will be removed at later version. Am I right?

By that time, my 1.4 app won't run (I believe) then I need to fix it to use the new method. Then is it a disadvantage of Java?

Thanks
David
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
suprapto45Author Commented:
>>"You're not very likely to get methods deprecated between 4 and 6"
Yep, you can breathe easily and happily till version 6. How about version 7 and so on?

It starts to be similar to Window where all the vendors start testing their app towards Windows Vista, doesn't it?
0
 
JaaxConnect With a Mentor Commented:
>But deprecated means that it will be removed at later version. Am I right?
No. Deprecated means Java discourages its use.
Java may discourage from using certain methods in a class, but it has never ceased support for earlier implementations. Methods are backward compatible  (even though Java may have deprecated)
0
 
suprapto45Author Commented:
>>"No. Deprecated means Java discourages its use."
That is much a relieve :). It would be a disaster if Java follows how Window works. Actually, it is the good thing for us to earn *extra* money as they need to keep upgrading their system :D.

Sorry, I gotta go for a meeting. Please feel free to post any comment(s).

Thanks
David
0
 
objectsConnect With a Mentor Commented:
1.5 is pretty wide spread now. The majority of your users will be running 1.5 and greater.
Wouldn't get too concerned about deprectaed methods. If you develop to 1.5 and don't use any deprecated methods then you're going to be future safe.
0
 
suprapto45Author Commented:
Thanks all again.

CEHJ, your 3-characters - *Yes* answer worths 200 EE points :).

Thanks Jaax and objects.

David
0
 
CEHJCommented:
:-)
0
All Courses

From novice to tech pro — start learning today.