Webstart Rant

As nice as webstart could be, it isn’t. Even when you get past the lack of documentation and a ton of other little quirks (especially if you are signing things), and then you still find yourself having problems with some people not being able to run it due to webstart bugs… so I find myself using jexepack which does almost exactly the same thing as webstart, only it makes an exe instead of using a jnlp file to run, and of course, due to that it own’t work anywhere but windows… but I strongly suspect that there are less mac users, than windows users who can’t get something to run right with webstart (and mac users probably suffer the same webstart issues as windows users).

Anyone want to give me advance warning about jexepack before I decide to rely on it for distribution, has anyone had a lot of problems with it or is it just an unknown tool to most of the community here?

Why bother when you can simply package the whole thing up with NSIS installer?

Cas :slight_smile:

Why bother with which, webstart or jexepack? I think I’m firmly in the why bother with webstart group now, it’d be an excellent tool if it worked right (and had a few small enhancements would be a huge plus). The jexepack tool is fairly simple, and it can package up the jre as part of the executable though I personally didn’t do that (but I know there have been cases where people wanted to). Both jexepack and nsis look difficult to use, though I’m assuming nsis probably is pretty simple to use once someone actually decides they are going to, I know jexepack had me feelin nervous about having to spend 4 hours figuring it out but once I looked at an example I was set in about 5 minutes… on the other hand, NSIS is free, so I probably owe it to myself to check it out.

Edit: Unless I missed it NSIS only provides an installer, you’d still have to use a .bat file or some other method of setting up your program to run, the jexepack creates a single exe file (with all resources) that a user can just run… it’s not an installer, but by knocking it down to a single file it kinda reduces the need for an installer. I suspect that the single field is decompressing itself to a temp folder and then executing the java runtime (I know the java run time is used by the jexepack exe file) so for something with a very large amount of data files it could create a huge overhead for startup, I don’t know if that’s the case or not… my total file size is 1.8mb and I can’t see any significant delay on startup (I’m on a pretty new machine though too… so it might just be barely noticable on this machine). I’m trying to get the game published, once that goes through or fails miserably, I’ll post the game in the your games here forum (hopefully a link to a publishers website with it and not a link to my website where it can share a home with my other previous creations).

The great thing about Macs is that Java with JWS comes pre-installed by default. I think your sucess rate with Mac users would be nearing 100% due to this fact – there is very little you can stuff up. For example, unlike Windows you can’t have two different versions of Java installed (this is a disadvantage from a developers point of view, but in my experiance most people with Java windows problems, including developers who should know better, are due to version confusion).

Additionally, Java updates come with all the other Mac security updates (unlike Windows), so the chance of a Mac user having the very latest version of the Apple JVM are also quite high.

Java swing apps also look like native Mac apps, and OS X has really good OpenGL drivers (helped by the fact that the OS uses OpenGL extensivly) so really it is a great platform to target ($$$).

Personally I like NSIS for windows deployment as well and have been using it for years. I’ll probably continue to release an NSIS EXE for Windows, and a zip/tar.gz for all platforms, plus a JNLP for those who like JWS (as much as I like webstart, I don’t want to force it down peoples throats, and it does have its limitations).

Regarding your rant, I would like to hear some specific issues :slight_smile:

Cheers,

Will.

I normally give the users a “javaw -jar myApp.jar” style shortcut + a .bat for debugging (has console output). Works pretty well for me. But really, just use whatever works for you :slight_smile: I would still recommend having a JNLP, at least in addition.

Will.

With the NSIS route, you embed the entire VM in your application (or if you are more pragmatic, just the bits of the VM you use ;)). Then you create a tiny stub .exe to launch your app with the parameters you want, or simply use a .bat file and invoke javaw.exe instead. I prefer the custom .exe route.

NSIS then packs it all down into an unbelievably small size using LZMA compression and turns it into a really fast and convenient installer.

For an online retail software product situation, Webstart is pretty abysmal. Apart from the bootstrapping issue (no webstart? Link doesn’t work) people really don’t feel like they’ve actually “got” anything worth paying for.

We all love Webstart in here but when was the last time you bought something delivered by Webstart?

Cas :slight_smile:

Puppytron?

Kev

lol, touché

Haha :slight_smile: Yeah, but only my board acquaintances have bought it. Sales == 0 now.

Cas :slight_smile:

I didn’t really expect webstart to be the way the game was sold, as it’s not what current publishers of this type of game are used to dealing with (realarcade and shockwave are good examples where they have their own wrapper program that is used to time limit the demo). I was simply hoping webstart would be a reliable way to play a probably cut down version of the game on the web without the hassle of downloading anything.

Some specific issues with webstart that I can think of right now, the lack of layered security permissions, it’s all or nothing (well, all, nothing or j2ee permissions though I’m not sure what that is exactly). I remember the 1.5 beta had a wicked habbit of grabbing the jnlp file, and then only getting part of it and losing the connection or something and basically screwing the download up, there is a thread around here somewhere listing the problems people have had, the only one I know of that’s fixed is they finally change that ridiculous warning on the all permissions web start applications… my own brother was damn near shocked out of running it after seeing that warning (and other people who know me too). I’ve had a lot of situations where a webstart copy of something I wrote, wouldn’t run for a lot of people but a jar version would. Of course, my mom couldn’t get a jar version running because java wasn’t in her path… and webstart was no issue… but all the other problems kinda drown that out. Like I said, webstart is almost a damn good tool, and I do think we could distribute games and sell them via webstart if it just worked more consistantly.

As for mac being better… a friend of mine has a mac, he’s not that computer literate, so I was walking him through installing java (yep, cause whatever version he had was old) and when he tried to run the java installer… it said his os version was too low… I assume it’s just a matter of downloading a patch to fix that, but I’m not really familiar with the mac os, no idea why he didn’t just update his OS then, unless maybe it’s a monster big file.

[quote]For example, unlike Windows you can’t have two different versions of Java installed
[/quote]
This is NOT true. Mac OS X allows only one version of each major Java release, i.e. currently on OS X you can have one Java 1.3 JRE and one Java 1.4 JRE installed at the same time.
When Java 5 is available (presumably with the release of OS X 10.4 inthe first half of this year) one can only speculate… but I’m guessing it will co-exist with the 1.3 and 1.4 JREs.

[quote]As for mac being better… a friend of mine has a mac, he’s not that computer literate, so I was walking him through installing java (yep, cause whatever version he had was old) and when he tried to run the java installer… it said his os version was too low… I assume it’s just a matter of downloading a patch to fix that, but I’m not really familiar with the mac os, no idea why he didn’t just update his OS then, unless maybe it’s a monster big file.
[/quote]
Because Apple treats Java as a component of the operating system, they have fixed various issues with Java (usually AWT related) with a combination of patches to the JRE and the OS.
Apple releases many minor OS updates for free. For example OS X 10.2.x for all values of x are free to users that have purchased OS X 10.2. But OS X 10.3 is an upgrade that you must buy. (Currently we are at OS X 10.3.7 - 7 minor updates have happened.) Java 1.4 requires OS X 10.2 or above, I presume due to the existence of various hooks in the windowing system required for AWT to function properly. I also think that the latest update to 1.4 may need OS X 10.3, and I think it is quite likely that Java 5 will require OS X 10.4.

The OS can be purchased for about $130 I think, and the updated OS’ seem to include significant advancements making that price fairly reasonable… but obviously a factor in terms of one’s ability to upgrade their JRE.

Well if it is J4exe you are thinkin of I would concider just distributing the jar file. I have had so much trouble with J4exe:

The Random class fucked up things. It gave the same random number for an entire second which meant that if ou run loops that uses different random numbers, those would all be the same.

Using the SCanner class was simply not possible. I dont know if it was because j4exe was using Java 1.4 but I only had 1.5 installed and still it denied the existence of the Scanner class.

[quote]there is a thread around here somewhere listing the problems people have had, the only one I know of that’s fixed is they finally change that ridiculous warning on the all permissions web start applications… my own brother was damn near shocked out of running it after seeing that warning (and other people who know me too).
[/quote]
Lets not forget you can get properly signed certificates so that you get a MUCH kinder warning message.

Will.

But you still get a warning message. Asking you to trust what looks like an unknown company. People are not used to this and are still terrified and say no.

The 1.5 scary warning isn’t too bad, it’s certainly no worse than the warning for an exe file which is appropriate.

I’m not using J4exe, jexepack is a different tool.

On the note of randoms, most of the time when I use a random (which is uh, just about every time I write something), I will using public static Random R = new Random() in my main class, this way it’s only seeded once, since Random() is seeded with the current time and on windows 95/98 system time is only accurate to 55ms (currentTimeMillis will alternate between 50 and 60 ms differences). Anyway, anywhere else I use a random number, I usually reference that one. This should work fine for anyone who’s just wanting random numbers, for those who use a seed for encryption or some other reliable generation of number sequences… it shouldn’t be an issue.

jexepack homepage Linking this so anyone who wants to check it out can, I think it’s a quality tool, I have not tried to embed the java runtime into the exe, it took me about 30 seconds to look at an example ini file, copy it to my game folder and set it up… and then like 15 seconds later on when I realized I forgot to include some other non-essential files hehe.

[quote]This should work fine for anyone who’s just wanting random numbers, for those who use a seed for encryption or some other reliable generation of number sequences… it shouldn’t be an issue.
[/quote]
If you want good numbers for encryption, then you should seed it yourself, through a set of strong algorithms. Even better, use a custom Random implementation. Something like the Mersenne Twister or TT800 should do the trick. :slight_smile:

The scary warning really sucks, and this is after the “miracle” of actually getting Webstart to work in the first place.

Cas :slight_smile:

This board is complaining that my message is to long no matter how short I make it?

Nothin’ scares me, and too long isn’t bad. Bad language is.