Should I use Java 1.5 already?

Hi there,

I’m excited about the new features as propably most of you and would like to use it right away in my next game project. But I’m not sure if this is a good idea. I would not want to have users download a new Java version when they have installed 1.4 already, I think that would be hard to understand for most of them. I think it is going to take quite a while until most users will have upgraded to the latest version.

A different approach would be to embed it, but that would add another 15MB to the download size. Maybe I could throw away unused classes, but I’m not sure how much this would save.

What do you do? Do you already use Java 5?

Yes.
I’ve been waiting a long time for generic collections and other things in Java so naturally I’m using Java 1.5 the day it came out. (Smart IDEs like Netbeans, JBuilder, IdeaJ, etc support 1.5 since some time so it’s a pleasure to use.)

I’ve to add however that I’m not earning my living with Java development (yet?) so it’s a simpler decision.
Still, even in case you depend on customers using a JVM, it depends on several things:

  1. You create a game looking (and playing) great so that hardly anybody would like to miss it - voila: they’ll download Java 1.5 with pleasure!
  2. Your game’s data will be (much) larger than the JRE, so you can bundle the 10-12 MB of the JRE 1.5 easily.
  3. You’re developing a game as hobby project and it won’t be finished until 2005+X you could of course use Java 1.5 now. :wink:

Well, we’re the developers, we’ve got the power … uhm … we’ve got the possibility to show the users more reasons to use Java 1.5…

PS: With smart tools like Toby’s “backwards compiler” and JBuilder’s equivalent it’s possible to compile Java 1.5 source codes to JVM 1.4 one.
Until of course you use all those new nice lib classes like System.out.format() etc.
PPS: Is it possible to use these classes in older JVMs, too? (Probably not).

Also have my first uses of Tiger already. Not generics, but the ability to refine the returntype of an overloaded method…

[quote]Also have my first uses of Tiger already. Not generics, but the ability to refine the returntype of an overloaded method…
[/quote]
IMHO, this is the thng Sun should have been shouting about in 5.

[quote]Hi there,

I’m excited about the new features as propably most of you and would like to use it right away in my next game project. But I’m not sure if this is a good idea. I would not want to have users download a new Java version when they have installed 1.4 already, I think that would be hard to understand for most of them. I think it is going to take quite a while until most users will have upgraded to the latest version.
[/quote]
In theory, many of them should have it by now, because it downloads automatically in windows-update style.

In practice, JAVA 5 IS NOT YET RELEASED. (c.f. the other thread where people discovered that telling webstart to download 1.5+ fails - because Sun hasn’t put the java 5 download on the web yet!)

So…I would wait at least as long as it takes for Sun to make it available (!), and then wait another 3-4 weeks for windows users to get around to clicking “yes” on the “auto-update java now?” icon on the desktop.

By then, you should find a large number of people have java 5.

Or…you can join the underground movement of people who refuse to use 5 in protest at generics :P. Although you might be very lonely there ;).

All right, I could live with that because our next game will take some time until completion. Still, users without dsl will think twice about downloading 15MB…

What about embedding the VM and being independent of local installations?

So far I’m pro generics :wink: (but still playing around)

Please don’t bring up that argument in this thread - go find one of the threads dedicated to it :). I was primarily a dialup user until only a year or so ago, and even now often am (in fact from tomorrow lunchtime for a couple of weeks onwards I will be dialup-only), and it’s much less of an issue than people make out, IF you know it’s a one-off cost. You have to download stuff to play games, so you set the download going before you go to bed, then disconnect in the morning. Or any of a number of different ways of slowly streaming it.

Do you embed an OS with your game, too? (rhetorical question ;))

Please don’t. Unless you make it the second (or, preferably, last) option on the page so that only people who really really want it click on that particular link istead of the webstart link which is what almost everyone wants.

Embedding a VM is a stupid idea in general, IMHO. You’re forcing people to download a VM (which most people already have - so you’re massively wasting their time) and then once it’s downloaded if its a new VM they didn’t have they STILL have to download the ****ing thing to play any other games that need that version.

Worse, if you update your game, they have to download the VM a second time. Stupid. Stupid stupid stupid. You end up spending ages working on an endless series of workarounds to new problems thrown up by your previous workarounds, all because you wouldn’t just let the user download java on their own, if they didn’t have it already (which would probably put them in the minority).

Use webstart. That’s what it’s there for.

Embedding a VM is a great idea if you actually want to make any money off of small games…

Cas :slight_smile:

Uups, looks like I missed some discussions here… :slight_smile:

[quote]You have to download stuff to play games, so you set the download going before you go to bed, then disconnect in the morning. Or any of a number of different ways of slowly streaming it.
[/quote]
Well, not an alternative where I come from (Germany) where you have to pay for your dial-up connection based on online time (unless you have some other deal)…

But I get your point. From the developer point of view your remarks make perfectly sense. The business view might be different and I’m not sure we have the same kind of customer in mind. Especially webstart. It’s great for testing a game. But then I have to download it again when I want to own it. I suppose a major part of users want to download it only once and then maybe unlock it by registering. But I suppose this is the case for most users, I’m not aware of any current statistics so I might be wrong and spending to much thought on a negligible minority.

[quote]Embedding a VM is a great idea if you actually want to make any money off of small games…
[/quote]
I saw that AF is doing this and that the download is still only about 11MB. How much could you rip off the VM?

As usual with these releases, don’t ever deploy something on a .0 release. Start using and coding it, but don’t send it out into the wild. Wait for the _01 release after they’ve fixed up all the fubars that they didn’t catch until a huge group of “testers” tried it out once it had gone final.

And don’t use Java5 if you want your game to run on Macs

http://weblogs.java.net/blog/invalidname/archive/2004/10/why_mac_develop.html

[quote]Embedding a VM is a great idea if you actually want to make any money off of small games…
[/quote]
Ah, now I thought you’d come to believe that it’s more vague and wooly than that? That the benefit of embedding today, close to 2005, is a lot less and shrinking all the time, (depending on market)?

Just to be clear, as it stands today, I would not say you mustn’t embed a VM, just that it should not be the primary download choice. And that it’s a lot of work, and a lot of hassle, and a lot of extra D/L bandwidth (although all those are workaroundable - the question is are there other things you could be spending that time on that would improve your sales more, like doing more marketing?). So, “in general”, it’s a bad route to go down. If you have the resources to do it without blinking, great. Do it. But most of us have enough to do already just getting our games finished, bug-fixed, and online.

Well, we’ve had unmetered online access in the UK for 5 years now, and I had assumed it had got to most of europe by now too. However, the dialup I have to use is also metered (because it’s with a laptop, no fixed location).

But…that just SCREAMS “don’t embed the VM” because embedding the VM only increases the amount of downloading for the user.

(even on broadband, I have not bothered playing a couple of java games that were ONLY distributed with an embedded VM - I simply couldn’t be bothered to wait that long, with all my b/w tied up.

[quote]In theory, many of them should have it by now, because it downloads automatically in windows-update style.
[/quote]
Wow! This is the first I have heard of this. I think that is awesome. I have been concerned that 1.5 wouldn’t become widespread for a long while yet, but this will definitely speed things up a lot.

[quote]And don’t use Java5 if you want your game to run on Macs

http://weblogs.java.net/blog/invalidname/archive/2004/10/why_mac_develop.html
[/quote]
I was going to add this, but you beat me too it :slight_smile:

Java 5 for Mac won’t likely be available until halfway into 2005, and it will very likely require an OS upgrade for Mac users. So the Mac market for Java 5 programs is still about a year off.

In theory.

In practice, there are big bugs with the system (like it not downloading updates when it should) and I’ve several times seen it refuse to download an update I knew was available.

So…people may already have started turning it off. Or it may not allow 1.4 -> 1.5 upgrades. Or something stupid like that.

And…I think it uses the webstart download, so it too isn’t available yet (at least, it hasn’t popped up on any of the windows PCs around here yet).

[quote]PS: With smart tools like Toby’s “backwards compiler” and JBuilder’s equivalent it’s possible to compile Java 1.5 source codes to JVM 1.4 one.
[/quote]
Yes, I’m aware of them. But how good are the results? I do not want to introduce new problems because of backward compiling. And how about performance? Any experience so far?

JBuilder’s 1.5 to 1.4 compiler I used a little while with good results - no benchmarks however. Until I started to use new 1.5 classes, too. Hence I’m using J2SE 1.5 now, which isn’t problematic because my (hobby) game project won’t be finished this year anway.

About Retroweaver: Since the author Toby is participating in this forum, too, maybe he knows some case history. Toby, are you reading?

[quote]Yes, I’m aware of them. But how good are the results? I do not want to introduce new problems because of backward compiling. And how about performance? Any experience so far?
[/quote]
You should have no problems “backwards compiling”. If you’re concerned about using 1.5 only features, Retroweaver will warn you if attempt to use classes, methods, or fields that are only available in 1.5. Even the unusual cases work well - for example, several people have been successfully using Retroweaver with native compilers (gcj, Jet) and obfuscators (ProGuard).

Performance is just not an issue. The transformations are all done at compile-time and perform the same work that has to be done in 1.5. Of course, rather than taking my word for it, you could just try it yourself.

I don’t know why some people are afraid of even attempting to try Retroweaver. It seems like I’ve seen enough of that, that I’ll probably put up a “testimonials” page containing reports from happy users of Retroweaver. For example, Resin and ScheduleWorld both use Retroweaver. The most common feedback I get for Retroweaver is “Retroweaver Rocks!”

God bless,
-Toby Reyelts