Downloadable "Embedded" JRE Licensing Issues

I have several applications that I want to make available for download. Rather than having to upload the JRE to my website 3 times (embedded in 3 seperate files), I would like to only upload it once.

I found the freeware installer NSIS. It seems to have the option to let you download a file from a website and then install it. I would like to have a copy of the JRE on my website and then have an NSIS installer that checks whether the JRE is installed and then downloads it if it isn’t.

Since there’s several applications, an user would be able to use all the applications and only download the JRE once.

This would be similar to an installer created by Install4J (http://www.ej-technologies.com/products/install4j/overview.html). What I’m worried about is licensing issues. This isn’t really “embedding” the JRE, but it must be permissible because Install4J does it.

Is it permissible to use all the JRE’s files just without the JRE’s installer? (It would be placed within the application directory just like it was an embedded JRE.) There are 2 reasons I want to avoid using the JRE installer:

  1. I want it to install “silently”. I really hate it when someone downloads an application and thinks that JRE is the application just because the JRE installer pops up at the end of the application’s installer.

  2. I don’t want people to be able to uninstall the JRE without uninstalling the application too.

Basically, I would be using the JRE just like an embedded JRE, but it would be downloaded as a seperate file by the installer. It could be that just having the JRE and the application stored as seperate files violates some aspect of the licensing agreement. Does it? It seems harmless to me, but I don’t know what the official stance on this is.

I posted about this on Sun’s main forum, but got no reply.

Assuming all this is permissible, is it permissible to remove files as the license allows for embedded JREs? Somehow, I doubt that, but it would save me a little bit of bandwidth. Removing the extra files is unnecessary, though. I just want some way to automatically download the JRE silently without having to buy Install4J.

don’t worry about it 8) I am pretty sure you make a lot of friends in jail …

seriously, I don’t see a problem with what you do? You also posted it in the Sun forum and nobody commented. If Sun does not care to comment, I would assume there is no problem. In the worst case, what does Sun want to do if they catch you? Start a lawsuit: Sun Inc. vs. fletch the programmer … I don’t think so … ;D

(am I confused here, or did kingaschi just promote copyright violation?)

Stanley Ho of the Sun deployment team said something about ‘silent installation’ in his comments at the bottom here:

http://weblogs.java.net/blog/stanleyh/archive/2005/05/deployment_unde_1.html

“If you simply bundle the JRE installer and invoke it in silent mode as part of your application installation…”

I don’t know what he meant though. Maybe you could take a look and tell me. :wink:

Keith

You should ask Microsoft and Linux developers for that.

I don’t think that’s really what he meant. Although doing as I said doesn’t seem like it would hurt anyone, I don’t know how kamikazee Sun’s lawyers are about tracking down minor violations. Regardless of the law, I don’t want to want to break Sun’s license. I don’t want to cause problems for the people who created a programming language (and development kit) that I find to be both simple enough enough to use and powerful to create the programs I want to program.

I’ve looked at the blog. “Silent” mode means that when the JRE is installed, it won’t make any installer window pop up - it’ll just happen. After reading your post, I did a google search and found http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/silent.html, which explains how to do it.

This solves the problem with installing the JRE silently, but the user would still be able to break the game by uninstalling Java. I am, however, pleasantly surprised the silent mode installation does allow you to include the midi soundbank if you so desire.

Right now, I’m downloading the evaluation version of Install4J to see exactly what it does. From reading the features on the website, I know it can download the JRE (which I would have to post on my website), but it doesn’t embed it within your application. I would much rather have it embedded within my application.

What I really want is to wind up with the following directory structure on the user’s computer:

Program Files[My Company Name][game 1 name]
Program Files[My Company Name][game 2 name]
Program Files[My Company Name][game N name]
Program Files[My Company Name][jre (including version number)]

Then I would also have some text file (e.g. jre_version.txt) specifying which jre version number was the current one so that I could have the jre get updated.

Previously, I considered writing a download manager in Java that would have the JRE embedded. Then it would download any of the games off my site. I think this is a bad idea for 2 reasons. First, people who already have the JRE would still have to download it. Second, it seems kind of tacky to have people download the setup file and then have to pick which game(s) to download. With the online installer, an NSIS script, or an Install4J installer, I could download the JRE only for people who don’t already have it (avoiding the first problem).

And after reading these posts, I thought that it would be cool to share the download manager and allow everyone to have a Java “Sandbox” to install things in that would be safe from the user uninstalling Java without uninstalling the game. Of course, that would be just like installing Java normally except that it would have this dubious sort of “hidden Java” business.

I’m thinking that I might just say “screw the bandwidth” and just embed the JRE normally. I’ll eventually have to get DSL just to upload all the $%#$ game updates all the time, but I’m planning to get DSL anyways.

[quote]install4j: it can download the JRE (which I would have to post on my website), but it doesn’t embed it within your application
[/quote]
install4J can embed a JRE if you like (except for Macintosh)! I do that, and I am not aware of any legal issues.

I would definitly opt for embedding the JRE, no matter if the user already has JRE on his computer. That way the users can download the installer of your game and install the game hassle-free. I personally don’t like online-installers - what if I do not want to be online?

I just finished looking at Install4J. You can embed a JRE bundle in the installer or put it on your website where Install4J can download it. It can either be shared among all Install4J-installed applications or only work for the application that installed it.

I think I’m just going to embed it normally, as you suggest. Looking into my reasons for not doing so, I think the most important to me is really saving time uploading the $%#$ demos. When I finally get DSL, this will not be an issue.

I think I will also include some sort of manual update in the programs so that the users can update the game to the newest version without having to download a new installer. Nothing will happen unless the user selects the option from the menu, and they’ll have to be connected to the Internet for anything to happen. That will reduce the bandwidth usage from people downloading demos with embedding JREs all the time.

How about using Java web start to make your program auto-update aware?

I created an installer for install4j which just runs your online java web start game. everytime you upload a new web start version, the installed application automatically downloads the new files.

Check: http://www.java-gaming.org/forums/index.php?topic=13064.0

It looks like a regular application for a user, but used javaws to actually run your game!

Silent installation sounds great, I didn’t know we could do that. Thanks for digging it up.

[quote=“kingaschi,post:7,topic:27449”]
On the Mac you should not use an installer at all. You should make an application bundle. It’s easy to do and results in a much better user experience. Unzip with a double click and it’s done, or if Safari is set up to open “safe” files the bundle will be unzipped automatically and so your game will simply be there, ready to run wherever it was downloaded to (usually the desktop)… at that point there is one icon representing all of your game that the user can drag to wherever they want.

As a developer you don’t actually have any control over what JRE is on a Mac system. All you can do is specify what version you need in the app bundle, just like with Web Start. If the user runs the standard OS X “Software Update” they will get the latest version of Java that is available for the OS. Currently OS X will simultaneously have a version of Java 1.3, 1.4, and 5.0 via that process. Though I would not be surprized if 1.3 is dropped when Java 6 is ready.

As for bundling the JRE on Windows, I like the structure outlined above with a single JRE per company that is shared by all the applications. You can then also put things in the extension folder that you control instead of having a copy of JOGL per game for example. (Not that it is a huge thing.)

Another alternative is that Sun provides some better APIs to hook into Web Start so multiple JREs on a single machine can always be shared by all Java apps, but allowing more control for the developer to install the application where they want, and not being forced to install via Web Start. Basically we need a way to get the Web Start JRE management while avoiding the Web Start cache - that woudl be great. Sadly, Sun doesn’t “get it” yet … they think Web Start is supposed to be some sort of cache manager at most, and that’s very counter intuitive for the users.

I’d rather avoid running a seperate program from within mine unless absolutely necessary. It’s not too difficult to write code to download the updates, so I’ll probably just write my own code. I can use the same code for every program - I’ll just need to have some method parameters specifying where to look for the update.

I’m only distributing games for Windows, since I have no Macintosh to test games on.

I like the idea of having a single JRE per company too (after all, it was my idea). The only issue is that I can’t just embed the JRE that way. I would have to download it only if it weren’t already present. That sounds like a good thing, but it might annoy some people. I’ll have to post some polls on some bulletin boards to see if people mind that sort of thing.

[quote=“swpalmer,post:11,topic:27449”]

FYI my latest game loads initially off a very cut-down class that checks the system props to see if you’re running OS X, then checks the JRE version, and throws up screens with very basic graphics (when the version is low, you could get all sorts of problems - e.g. only the latest OS X JRE actually supports PNGs, for instance; but I use this for also handling too-old windows versions etc too) telling the user how to upgrade to OS X 10.4.6, and to run software update, because that will install the latest java properly :).

If they haven’t done that, and aren’t a java developer, chances are they are running a buggy 1.4.x JVM, even if they have 1.5 installed. Only way to access 1.5 in that case seems to be via webstart, or asking the user to reconfigure their system (yuck).

[quote=“blahblahblahh,post:13,topic:27449”]
Why must you exagerate things so?

OS X supports loading PNGs since 1.3, like all Java implementations must. YES, it had bugs in some intermediate releases, but they never affected ALL PNGs and the bug was only present for a few months and only for Java 1.4, if I recall correctly. Anyway I think it was only an issue for 32-bit PNGs and the result was that the colour channels were swapped. It’s not something I would even think about at this point, since anyone that keeps their system updated will have a fixed 1.4, or Java 5. Those that don’t get some ugly colours,they complain, you tell them to do a Software Update, problem solved.

Those that don’t get some ugly colours,they complain, you tell them to do a Software Update, problem solved.

But some people are still using IE despite the fact that firefox is only bout 5mb. Its the same thing… really.

(From the game pov there is very little reason to use png. In a compressed jar raw formats are about as small as pngs unless you’re using funky pngquant-ed pngs [indexed rgba], which are apparently way smaller than compressed 32bit raws or 32bit pngs.)

[quote=“swpalmer,post:14,topic:27449”]

That wasn’t the bug I was thinking of. I was thinking of the one that means the LATEST 1.4 JVM doesnt handle transparent PNGs properly. Shrug. This was still true as of 4 weeks ago.

I consider being unable to render the key feature of a file format (alpha transparency) as a severe bug, enough to say that it doesnt support that file format. YMMV.

I mentioned it because its a serious problem for developers, and thought I might be able to save some casual reader some pain by warning them to make their preloader as simplistic as possible.