Skip to main content

Consumer JRE and User Experience during installation

19 replies [Last post]
maksym_shostak
Offline
Joined: 2007-07-17
Points: 0

Hello.

I'm considering about using Consumer JRE for my desktop application.
It seems it is better to wait for its release candidate, because of...

With standard JRE
the setup algorithm of my application is:
1. installer checks whether user has JRE 1.6+ installed
2. if needed, installer downloads and installs standard JRE 1.6 silently.
All works nice. There is no annoyance dialogs, but 14Mb to download
and 160Mb free disk space.

The Consumer JRE.
I downloaded Java Kernel. When I started this executable, it displayed
the progress dialog, and then was the 3 steps(dialogs) installation process
of JRE. (See 1.PNG)

After that I turned off the Internet connection and tried to launch my application.
It failed because of absence of additional components.
(See 3.PNG)
But my customers do not know (or need to know) English and what is Java.

So, can I use Consumer JRE to create better user experience (or where is jkernel.exe and silent installation)?

P.S. Who knows, what is the url of the latest stable JRE 6 installer?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tsinger
Offline
Joined: 2003-06-10
Points: 0

> Ethan Nicholas here. We're actually going to be
> holding off on the custom bundle plan, for a lot of
> reasons, both legal and technical.

IMHO that is a bad choice, because then we will not be able to make use of your work (size reduction) when trying to offer a all-in-once bundle of our application which can be installed on any machine, even those not connected to the internet.

As cowwoc already wrote: downloading the rest of the JRE, esp. over a slow internet connection (if any), on demand makes the user experience worse.

Just curious: where the downloaded rest of the JRE will be stored on the end-user machine, especially when running with limited account?

maksym_shostak
Offline
Joined: 2007-07-17
Points: 0

Will the Quickstarter service be enabled in first Java Kernel release?

Message was edited by: maksym_shostak

dleskov
Offline
Joined: 2003-06-27
Points: 0

> :) Excelsior-Jet is very very costly for me.

Do you mean the monetary price or the remaining download overhead? If the former, Excelsior JET is free if your app is non-commercial: http://www.excelsior-usa.com/jetfree.html

maksym_shostak
Offline
Joined: 2007-07-17
Points: 0

Then I think it is worth to try the Jet.
But in long-term perspective, Consumer JRE seems to be the best choise (it must be) :-)

maksym_shostak
Offline
Joined: 2007-07-17
Points: 0

Hi.

It is my 2nd attempt to reduce download size of distributive
(installer).

I've tried [b]Excelsior JET[/b] for my desktop application (that is 1Mb jar).
Even using global optimization and sliming down Java SE API
the resulted compressed distributive is [b]16Mb[/b].

But my 1st method - packing [b]standard JRE[/b] (and its silent installation
later), results [b]14Mb[/b] distributive.

Have anybody better results?

P.S. "Correctness first, performance second".

tsinger
Offline
Joined: 2003-06-10
Points: 0

IMHO the best solution to reduce the download size is to use an older JRE instead of the new one, e.g. 1.5 instead of 1.6. Unfortunately, it does not work in all cases.

enicholas
Offline
Joined: 2006-02-27
Points: 0

Ethan Nicholas here. We're actually going to be holding off on the custom bundle plan, for a lot of reasons, both legal and technical.

Instead in the first Java Kernel release you will be able to specify a list of the additional bundles your particular program requires, and then they will all be downloaded ASAP as your program starts. Even without this list being specified Kernel should give a very reasonable user experience.

Java Kernel will be (again, in the first release) on the order of 4MB for most applications -- which, while still bigger than your 1MB application, is at least a far cry from 14MB. Obviously reducing this number still further is an ongoing area of research within Sun.

cowwoc
Offline
Joined: 2003-08-24
Points: 0

Hi Ethan,

1) Last time I tried Java Kernel I noticed it resolved dependencies at runtime instead of doing some basic static analysis. The problem was that "downloading missing components" popped up tens of times and it led to a really ugly usability experience. Are there plans on fixing this in the near future? Downloading all the dependencies at once would likely improve performance as well.

2) Custom bundling is actually a very easy way to reduce the installer size. By making *everything* optional (even AWT/Swing) you allow developers to reduce the installer size to the bare minimum. If someone really doesn't need Swing they should be able to achieve a 2MB installer with little effort.

As you recall, I spent a lot of time trying to customize a private JRE to my application. If I remember correctly, I managed to reduce my application size (with a bundled JRE) to 1.5MB (this included Swing). In my experience the harder part of stripping down the JRE is the native code. You can use Proguard to strip unused components from a JRE but it won't pick up on native dependencies. In my experience, the JRE native components are highly coupled (in some cases I don't think there is a reason for one component to reference another).

We have an automated way to strip-down Java code. The question is how we can automatically strip-out unused native code. This remains an unsolved problem.

Do you suppose it would be difficult to write a quick C parser that identifies which classes are being referenced by JNI? The idea would work as follows:

1) My application depends on JWindow.java
2) JWindow.java invokes System.loadLibrary("myNativeLibrary")
3) We need some tool which maps "myNativeLibrary" to a list of C/C++ files (makefile parser?)
4) We need some tool which scans C/C++ files for FindClass calls
5) We then feed the native dependencies back into Proguard and it knows not to drop classes referenced by the JNI files.
6) Now that we know which native files are referenced by our application, we can strip away unused native DLLs.

I suspect you could use a very trivial parser in steps 3, 4 and 5. What do you think? This would probably be enough to push us to a 500k - 1MB installer (eat your heart out Macromedia Flash!) :)

Gili

dsdseo5
Offline
Joined: 2010-07-29
Points: 0

Thanks for shearing this information about the User Experience during Installation

ericsully
Offline
Joined: 2010-05-10
Points: 0

here is a free user monitoring tool http://www.real-user-monitoring.com

maksym_shostak
Offline
Joined: 2007-07-17
Points: 0

Ok.

But [b]how to create custom JRE bundle and install it silently?[/b]
The size of this bundle must be about 3Mb, because it is simple
desktop application.

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

> But [b]how to create custom JRE bundle and install it
> silently?[/b]
> The size of this bundle must be about 3Mb, because it
> is simple
> desktop application.

Its not possible to create a special bundle - why don't you bundle the offline-setup of the consumer-JRE with it?

If this is too large you can compile your application with Excelsior-Jet, this way its native code and will run without a JRE installed. I was able to compile a simple Swing-App down to 8,5mb including all libraries needed.

lg Clemens

maksym_shostak
Offline
Joined: 2007-07-17
Points: 0

The size of my application is 1Mb (in installation package).
So additional 14Mb of JRE to download looks expensive in comparison.

Creation of custom JRE bundle will(?) be possible, according to
Ethan Nicholas's Blog http://weblogs.java.net/blog/enicholas/archive/2007/05/java_kernel_unm.html
(see "But what if I want to pre-download everything I need?" in the article).

:) Excelsior-Jet is very very costly for me.

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

Sorry that I mis-informed you.

By the way 14mb may sound costly - but its worth every MB :)
I am quite afraid of many app-vendors delivereing bundled JRE's for several reason:

1.) Most won't update their bundles, at least not every update-release, so users will install old versions of java instead of just pointing them to java.com.

2.) Now when Java is installed, Java is installed.
I can't imagine many half-dnoe java setups are a good thing, especially on copmuters with no internet connection. Those java-installations will stay broken forever there.

lg Clemens

tdanecito
Offline
Joined: 2005-10-10
Points: 0

Why do you think Sun keeps it's download current? If I use the silent download option with javaDeploy I notice that Sun has not kept up to date for it's cabs they are still at 1.6.0_03 and not 1.6.0_04 or 1.6.0_05. I was the one many months ago that wrote up a bug and it was fixed but seems silly developers have to do the obvious to get Sun to keep up to date.

That Cab mechanism is the common way to download and check for new java versions for intial installs & web start and neither download the latest.

Just interesting how people forget these small and important issues to get java installed on every desktop instead of just a few desktops.

Regards,
-Tony

mbien
Offline
Joined: 2007-04-29
Points: 0

>Just interesting how people forget these small and important issues to get java installed on every desktop instead of just a few desktops.

exactly (even if its a little bit off topic)
see my other thread for this issue:
http://forums.java.net/jive/thread.jspa?threadID=37453&tstart=0

maksym_shostak
Offline
Joined: 2007-07-17
Points: 0

The basic interest for me is Quickstarter. But even with it, the startup time of my application is about 15 seconds. The application launches automatically right after the user logged on to the Windows.

I'm still searching the ways to make startup faster.

Does anybody from Sun Java team reads this forum?
;-)

trembovetski
Offline
Joined: 2003-12-31
Points: 0

There's just too much stuff happening when the system boots - lots of services
start up, caches fill in, etc.. You might want to delay
the launch of your application for several minutes after the startup if possible.

Also, the quick starter won't help you immediately after restart since it
needs to pull the stuff off the disk - there's no magic trick there.

Dmitri

trembovetski
Offline
Joined: 2003-12-31
Points: 0

> But my customers do not know (or need to know) English and what is Java.

How is the Java installation experience different from any other
application/runtime on the net? If you unplug the network while Flash is
loading and installing it won't work too well either.

As for the English message - I hope the kernel installer will be localized
so the error message will make more sense to them.

Dmitri