Jump to content
  • Advertisement
Sign in to follow this  

[java] Interesting question on forward compatability...

This topic is 4643 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If my applet was made with JDK 1.5.0_04, and someone with a v1.4 JVM tries to play my game, will my applet still run if it has everything his JVM requires to view it?

Share this post


Link to post
Share on other sites
Advertisement
Basically, yes. As long as you don't use any of the new features/classes/methods added in 1.5 then someone using 1.4 will be able to use your program. The easiest way to check that you haven't used any 1.5 things would be to install both 1.4 and 1.5 on your machine and then use something like Eclipse, which allows you to switch which version of Java you want to use. Just change it to use 1.4 and if it still works then you're all good.

Of course this brings up the question of whats the point of using 1.5 features if noone can use them, and unfortunately thats up to you to decide. It all depends on your audience. I would guess that the average web user is still on 1.4, and I personally tend to use the 1.4 API to check classes etc even though I'm running 1.5 just because its more compatible

Share this post


Link to post
Share on other sites
Quote:
Original post by Vyper_uk
Basically, yes.


As noted by the other poster, this is wrong, sadly. Sun made the official decision not to support 1.4 with the 1.5 compiler.

Interestingly...they also simultaneously made the official decision to implement generics badly "so that it's compatible with 1.4 JVM's".

Um, Sun? You can't have it both ways...

Anyway, apart from the -source 1.4 -target 1.4 trick, there is something you can do that gives you what you REALLY want: java 5 features which run on a java 1.4 JVM! (apparently it wasn't all that hard - Sun were just being lazy or doing some lame marketing-crap). www.sf.net/projects/retroweaver (or google for retroweaver).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!