Ryan has posted 17 posts at DZone. You can read more from them at their website. View Full User Profile

Trying Out Java 6u10 Applets

10.20.2008
| 11594 views |
  • submit to reddit

The other night I downloaded Java 6 Update 10 (JDK) and installed it on my Windows Vista laptop to test drive the new applets plugin. I found that some applets show off the speedy startup time better than others. For example, I would say that every one of the applets at Applet Depot loads and is usable nearly instantaneously. Interestingly, the DotToDot applet crashed Firefox 3 many times, but works now?

On the other hand, every one of Report Mill's JavaFX Gallery applets take a good 10-30 seconds or longer to load. I have to watch the orange Java logo and progress bar while they load. Even after they load, some of them show a blank screen for 10+ seconds. What's different? 814KB of .jar dependencies. I wonder if the javafxrt.jar etc. are obsolete now with compiled JavaFX Script? That would cut out a lot of download time.

The progress bar in the orange Java logo indicates how much of the applet and dependencies have been downloaded so far. I know you can replace the orange Java logo with a custom animated GIF, but I don't know how you would make it interact with the applet plugin to be able to draw a progress bar like that.

References
AttachmentSize
fig-1.png15.14 KB
Published at DZone with permission of its author, Ryan Developer. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:

Comments

Jacek Furmankiewicz replied on Mon, 2008/10/20 - 7:48am

Well, I downloaded it last night and I have to say for me it's still a failure because of one simple issue: it still prompts for proxy passwords!

Instead of reading the proxy info from the browser's preferences, it pops up the dreaded "enter proxy info" dialog for every page with applets.

I submitted an issue for this months ago

https://jdk6.dev.java.net/issues/show_bug.cgi?id=21

and no one at Sun even bothered to comment on it (a P1 defect!).

I've never seen Flash or Silverlight prompt me for a proxy password, so for that simple reason I don't see how this update can really compete with them, especially in a corporate environment where proxies are common.

James Sugrue replied on Mon, 2008/10/20 - 7:50am

Ouch! That's something they've really got to fix. Hopefully they'll get it sorted in the next drop.

Jacek Furmankiewicz replied on Mon, 2008/10/20 - 7:55am in response to: James Sugrue

N/A (post edited, sorry wrong response)

Otengi Miloskov replied on Mon, 2008/10/20 - 10:35am

I checked the performance too of Java applets I wrote long time ago and it is awesome, pretty fast and the loading I will say better than flash, With this update Java desktop is a pleasure to use. The problem is the JavaFX samples those have like a little overhead or something no sure about it, Maybe si because JavaFX SDK still in preview. I'm still waiting for Mac support of this version I hope Apple get it soon for the browsers so can load applets.

Gregg Bolinger replied on Mon, 2008/10/20 - 10:47am

I wonder when everyone is going to realize that this new "applet" movement is probably going to fail.  Applets have a bad rap, and rightly so.  You can't convince the average computer user that some new JRE is going to fix all those problems.  And you still have the issue of (A) I don't have java installed and (B) I don't have Java6 installed, so I still get the crappy load times and UXP.

Nor is JavaFX going to save the day because at the end of the day it is still an applet so see previous points.  Sun is sooo incredibly late in this market.  I think they should skip RIA and attempt something drastictly new and different.  If they said "ok, we got beat on RIA, but what might be the next big thing" and focus all this energy on that, maybe they could lead a new revolution instead of riding the coat tails of this one.

Osvaldo Doederlein replied on Mon, 2008/10/20 - 11:08am

Jacek: I tested the SceneGraph demos that your bug mentions, and they worked correctly - under both FireFox 3.1-beta1 and IE 8 beta2 (didn't care to test with the latest stable browsers). Only Google Chrome (dev build 0.3.154.3) choked for a couple minutes with two "Plugin unresponsive" messages, but I didn't choose to stop the plugin, and eventually all applets loaded and executed correctly. In this case I'll attribute the problem to the browser. Additionally, Firefox 3.1-beta1 doesn't always work: opening the demos page several times, I've got a couple freezes or very slow loads, although 90% of the time it just loads fast and correct - once again the problem should be the browser (not just beta, but with the new an still very unstable TraceMonkey JIT fully activated). I think this page puts some serious stress on the JPI/browser loading, as the page contains six applets that load simutaneously, and not trivial ones...

My platform is Vista SP1, I see that you observed this bug on WinXP. This shouldn't make any difference for Firefox, that maintains its own proxy settings. Perhaps this proxy issue is not easy to reproduce and Sun bypassed it fow now? (In this case, a status update on the bug would be welcome, at least.)

Ryan Developer replied on Mon, 2008/10/20 - 11:18am

@Gregg:

1) Yes, the new JRE has fix all of the problems with applets. 

2) According to Sun the top 10 computer manufactuers in the world ship Windows computers with Java 6 pre-installed.  Since Java 6u10 is an update, all of those computers will get it automatically.  Even my mom and grandpa's computers have Java 6 already.

3) For computers that don't have Java installed, the process to get it installed is as painless as it is for computers that don't have Flash installed.  It sounds like you haven't read anything about the changes in Java 6 update 10.

4) Developers like me don't care that JavaFX is coming late in the game.  I still prefer an all Java solution over Flex or Silverlight.  Some use Flex today because they have no better choice, but once JavaFX is delivered with proper tooling etc. then they might consider using JavaFX for all new developments. 

Gregg Bolinger replied on Mon, 2008/10/20 - 11:35am

@Ryan

 1) That's debatable.

 4) By the time JavaFX is "delivered with proper tooling etc" something else will have already come along.  

Don't get me wrong.  I'm a Swing supporter and all around Java guy.   I'd love it if everything worked out but I also live in the real world. ;)

Osvaldo Doederlein replied on Mon, 2008/10/20 - 11:46am

Now, I tested also the JavaFX applets. The first one took ~20s to load, probably the JavaFX runtime, but the next applets loaded faster, in some cases almost instantly (simple ones without significant resources, like basic Animation).

Java SE 6 Update 10 is the base runtime for Java FX 1.0, which FCS release should appear soon. But check this bugtrack of 6u10-b32: 6735003: preload deployment common cache (plugin/webstart) with javafx libraries. It seems that the JRE installer will automatically preload the JavaFX libs (in background, after the JRE installation is "complete"). Except that it doesn't do that today, because the official JavaFX libs are not yet available. So, things may improve.

My biggest gripe with 6u10 is that when I start a JAWS application, say the JavaFX Periodic Motion demo, the experience is anything but seamless:

- The .jnlp file was handled by Firefox as regular download. OK, I told it to launch this kind of file with JAWS by default, so I didn't see the browser's "Save as" dialog again. But even then, every time I launch the app again, its .jnlp file appers again in FF's Downloads dialog... and FF opens this dialog again and again, and keeps dumping files like Periodic-2.jnlpto my download folder. That's pathetic, the JNLP file shouldn't appear or be saved anywhere.

- On IE8b2, clicking the launch button causes IE to flash a download dialogvery briefly, it goes away in a blink and without user intervention. I don't remember if I've already configured IE in the past to associate .jnlp to the Java plugin. Anyway, this short flash is ugly so it's even worse than FF after the initial launching association. OTOH, the jnlp files are downloaded to my TEMP folder instead of the downloads folder, I guess this is some kind of progress...

- Chrome is a little better than IE, but only because its download status is less intrusive (doesn't open any dialog, just a statusbar. The .jnlp files are created in the downloads folder.

- Even when the app is fully cached, when I launch it again the startup takes several seconds.

Clearly, more work needs to be done in the plugin/browser integration fro JAWS. No stupid download dialogs or jnlp files plluting my folders (not even TEMP folders), please! And smarter loading of fully-cached app. I guess the handling of JNLP files goes in the category of "browser behavior that the plugin cannot override", but in this case the plugin interface should be enhanced - shouldn't be an insurmountable task at least for the open source browser, perhaps the plugin could register file extensions that it wants to handle even the downloading.

Jacek Furmankiewicz replied on Mon, 2008/10/20 - 11:53am in response to: Osvaldo Doederlein

Does not matter from a user's perspective. If Flash and Silverlight can figure out the proxy settings without asking me, why doesn't the applet do the same? I did a regular install of the final version of 6u10 with a regular Firefox 3 already installed.

So, either there is some issue in the plugin or the installer does not update it properly to the newest version...but the issue is there.

Riyad Kalla replied on Mon, 2008/10/20 - 11:54am in response to: Gregg Bolinger

Gregg,

I tend to agree with everything you said. Sun seemed/seems to be so preoccupied with harder-core computer-science problems (closures? no closures? threading? multicore?) instead of the super-low-hanging fruit (is this EASY to deploy and EASY to run?) that they had the developers happy, but not the users.

So now neither care =/

Ryan Developer replied on Mon, 2008/10/20 - 12:11pm in response to: Osvaldo Doederlein

[quote=opinali]Java SE 6 Update 10 is the base runtime for Java FX 1.0, which FCS release should appear soon. But check this bugtrack of 6u10-b32: 6735003: preload deployment common cache (plugin/webstart) with javafx libraries. It seems that the JRE installer will automatically preload the JavaFX libs (in background, after the JRE installation is "complete"). Except that it doesn't do that today, because the official JavaFX libs are not yet available. So, things may improve.[/quote]

That bug ticket says "fix in 6u11".  Somewhere else I read that Sun isn't making big announcements about u10 yet because they are going to wait a week or something?  Maybe they're waiting for the launch of JavaFX 1.0, and maybe at that time u11 will come out too with this change?  I agree that the javafx runtime should not be bundled inside of every single applet.  None of the jars required for JavaFX should be bundled inside applets.

 @Gregg: I now agree that applets aren't completely fixed yet, but this is a huge improvement.

Osvaldo Doederlein replied on Mon, 2008/10/20 - 2:46pm in response to:

[quote=rdelaplante]

Java SE 6 Update 10 is the base runtime for Java FX 1.0, which FCS release should appear soon. But check this bugtrack of 6u10-b32: 6735003: preload deployment common cache (plugin/webstart) with javafx libraries.

That bug ticket says "fix in 6u11".  Somewhere else I read that Sun isn't making big announcements about u10 yet because they are going to wait a week or something?

[/quote]

The initial bug evaluation says "fix in 6u11", but the Release Fixed field says "6u10(b32)".

Anyway, if the Java FX 1.0 FCS is imminent, it would make sense for Sun to wait for it and make a single big announcement - plus other moves, like updating their OEM channels to get both 6u10 and Java FX together. In the same spirit, I expect the FCS releases of the Java ME SDK 3.0 (now in EA), Java FX Mobile, and LWUIT to be released together, just in time for JavaOne'09.

Carl Antaki replied on Mon, 2008/10/20 - 3:59pm

Java 6 Update 10 hasn't been even announced on java.sun.com that's weird. Also the Sun JavaFX blog has been inactive for 2 months without a single post there is no momentum. I know the engineers are working on the 1.0 release so let's hope JavaFX gets some momentum after that as Microsoft released Silverlight 2.0 and one has to admire their strong marketing,good tutorials. JavaFX is still immature and no has not been deployed on consumer sites. The problem with JavaFX is that it requires Java 6 Update 10 which is not available on the Mac and most Windows and Linux users don't have, it will probably take 1-2 years for most people to have it.

Ryan Developer replied on Mon, 2008/10/20 - 4:28pm

I emailed the people who maintain JavaFX.com with a bunch of suggestions to improve it.  The response:

[quote]We are working on a completely new website for the 1.0 launch which will highlight the SDK, the designer tools, and much much more. Stay tuned.[/quote]

I think the flood gates of activity and marketing will open with the launch of 1.0. Everything you see today is old.  JavaFX SDK, NetBeans plugin, javafx.com, etc.  Months of work has gone into all of that so don't judge it just yet.

 

Java 6u10 is available for Linux.  I seriously doubt it will take 2 years for advanced computer users on Linux to update their JVM.  Once their distro has update 10 in their package manager then everyone will get it.  Mac is really the only problem.  Maybe Apple will make you buy a new version of OSX to get the new features :)  I think Sun should take over the development of JDK/JRE on OSX. 

Dimitris Menounos replied on Tue, 2008/10/21 - 4:11am

Tried Java 6u10 on a fresh Windows XP install the other day. IMO it is improved but still a poor contender compared to Flash.

I mean with Flash, you mostly don't even know that it is there until you see the content run. Quickstarter has helped a lot, but Flash is still more instanteous and more transparent. Flash also does not require a quickstarter "hack" to feel light and fast. More over this feature seems to be available only on Windows XP (not Vista or Linux).

Lastly when you visit a page that contains flash specifically in Internet Explorer that has not Flash runtime installed, it will automatically and trasnparently download it for you so experience will be as smooth as it cat get.

 Oh and I find the java download page is too bloated and confusing! 

 Sorry to sound bitter.

Osvaldo Doederlein replied on Tue, 2008/10/21 - 7:36am in response to: Dimitris Menounos

[quote=agnus]

I mean with Flash, you mostly don't even know that it is there until you see the content run. Quickstarter has helped a lot, but Flash is still more instanteous and more transparent. Flash also does not require a quickstarter "hack" to feel light and fast. More over this feature seems to be available only on Windows XP (not Vista or Linux).

[/quote]

The QuickStarter most certainly works on the Vista platform.

Now, on the Java X Flash debate... the problem is that even a Java applet with a modest download size may depend on Swing, which is huge, bloated, and innefficient. Java 6u10 is a great improvement, but it cannot completely offset the disadvantages of Swing in loading time and resource usage, in usages like web applets where instant loading and lightness are important. Now, I understand that JavaFX is a layer on top of Swing, at least in the desktop version, so it won't help a lot. At least it seems to not make it even worse, because it relies a lot on additional accleration, native codecs and other tricks to implement all that SFX without a major additional footprint. Anyway, I have more hope in Java FX Mobile.

Osvaldo Doederlein replied on Tue, 2008/10/21 - 7:54am in response to: Carl Antaki

[quote=carcour]Java 6 Update 10 hasn't been even announced on java.sun.com that's weird.[/quote]

Adding to Ryan's reply, I guess (andhope) that the final SDK will be a big part of NetBeans 6.5, which FCS is scheduled for Nov 18.

[quote=carcour]The problem with JavaFX is that it requires Java 6 Update 10 which is not available on the Mac and most Windows and Linux users don't have, it will probably take 1-2 years for most people to have it.[/quote]

In the Mac OS X platform, JavaFX is compatible with 6u5. But this is a half-full glass; the half-empty part is that in the Mac, although JavaFX will run, it won't benefit from the improvements of 6u10, at least for some time. Some improvements of 6u10 are Windows-specific and some of these are already present in the Mac, like graphics pipeline enhancements; others are irrelevant (JavaKernel, Nimbus). But a few bits are missing and important, like the new plug-in's architecture and features.

Ivan Lazarte replied on Tue, 2008/10/21 - 3:19pm

Is anyone able to drag an applet onto their desktop?  That was supposedly a feature of the new release, yet I can't seem to do it in any browser.

Geertjan Wielenga replied on Tue, 2008/10/21 - 3:31pm

I succeeded, described some problems and solutions here:

http://blogs.sun.com/geertjan/entry/griffon_jdk_6_update_10

Ryan Developer replied on Tue, 2008/10/21 - 3:33pm in response to: Ivan Lazarte

[quote=ilazarte]Is anyone able to drag an applet onto their desktop?  That was supposedly a feature of the new release, yet I can't seem to do it in any browser.[/quote]

It's a setting you have to turn on when embedding an applet into a web page:

https://jdk6.dev.java.net/plugin2/#EXPERIMENTAL_FUNCTIONALITY

GeekyCoder coder replied on Tue, 2008/10/21 - 4:21pm

It will be great if someone can create a sample applet in a website that allows one to drag it out of the browser.

Karsten Silz replied on Wed, 2008/10/22 - 1:21am in response to:

@Ryan:

1) Why do I still see the big orange Java logo flashing when an applet is loaded?  I don't see an Adobe logo when Flash loads.  Also, the JRE is 4.4 MB, I believe, Flash is 1.8 MB.

2) These numbers don't matter that much.  Corporate environments put their own image on computers they buy and often lock them down so users can't install anything by themselves.  And home users often are afraid to install anything.  My mom doesn't click on the "Java bubble" in the system tray.

3) I think only Java 6 has semi-auto updating built in, so older Java versions need to be manually updated, but I may be wrong here.

4) Developers often must care about runtime distribution when they develop solutions (unless you're in controlled corporate environment where developers have greater control).  Flash 9 has probably 98% by now, and the latest 9.x point release reached 81.7% penetration in mature markets within six months.  How long will it take JRE 6u(1+x) to reach meaningful consumer penetration (say, 60%)? A year?  Two?

Ryan Developer replied on Wed, 2008/10/22 - 1:55am

@Karsten:

 1) Regarding the orange Java logo, that is shown while it is downloading the applet and dependencies.  It can be overriden with a custom one, which nobody has been doing in applets.  You see this all the time in Flash -- no different except with Flash people often override the default.

 2) Ok, so people who don't have update 10 just have slower applet loading.  JavaFX isn't going after the flash banner ads market, it's going after the RIA market.  They can wait a few extra seconds for it to load, and developers get to work in Java.

 4) Again JavaFX applets will work on older JVMs, I think I read as far back as 1.4 if you don't use Java 5 language features?  It's built on top of existing Swing and the FX Script compiles to regular Java bytecode.   If you use the new media codecs then it won't work without update 10.   So people not using Update 10 will just have slower load time when starting your RIA (not banner ads). 

 

Sun has laid the ground work to move forward in the RIA market.  New computer manufacturers will eventually update their images and ship millions of computers with the latest Java on it.   Developers wanting an all Java solution for new RIAs will be able to give JavaFX a serious look.  I know I haven't done RIAs in the past because I didn't want to learn a new language.  Why bother with Flex and ActionScript when Java has everything you need built in now?? It won't be long before most people are upgraded. 

Osvaldo Doederlein replied on Wed, 2008/10/22 - 9:42am in response to: Karsten Silz

[quote=ks116514]

Also, the JRE is 4.4 MB, I believe, Flash is 1.8 MB.

[/quote]

Flash is growing, isn't it? The previous release (not long time ago!) was only 1,4Mb. And for non-Swing apps, the base JavaKernel download can be as low as 2,5 Mb (I tested that).

UPDATE: Sun just released Update 6 of their Java Application Platform SDK. This includes the same SJSAS/Glassfish build as the previous update, but other componentes are updated, including Java SE 6. NetBeans 6.5RC1 is also available.

[quote=ks116514]

I think only Java 6 has semi-auto updating built in, so older Java versions need to be manually updated, but I may be wrong here.

[/quote]

Only 6u10 has the new Patch-In-Place feature, that allows much smoother updates: the same JRE installation is bumped to the next release, while previously you'd be left with an increasing number of outdated JREs sitting on the HD, each one taking ~90 Mb.

[quote=ks116514]

How long will it take JRE 6u(1+x) to reach meaningful consumer penetration (say, 60%)? A year?  Two? 

[/quote]

Probably faster than Flash, because Java's scheduled update checker will start offering this update as soon as Sun pushes it. Flash doesn't do that, most common users only update when they hit the first page that requires the new version (or buy a new computer with updated OEM stuff).

Osvaldo Doederlein replied on Wed, 2008/10/22 - 9:59am in response to:

[quote=rdelaplante]

Again JavaFX applets will work on older JVMs, I think I read as far back as 1.4 if you don't use Java 5 language features?  It's built on top of existing Swing and the FX Script compiles to regular Java bytecode.   If you use the new media codecs then it won't work without update 10.   So people not using Update 10 will just have slower load time when starting your RIA (not banner ads). 

[/quote]

JavaFX depends heavily on Java2D's new pipeline and other enhancements of 6u10. That's why JavaFX requires 6u10 (except on the MacOSX platform, where it manages to run with 6u5 - which is also the very latest Apple release - but I bet the performance will be compromised in comparison with Windows/6u10). But JavaFX is not even released yet, and its adoption depends on other items like seriously good design tools, especially those oriented to non-programmers (that may, or may not, be available by 1.0-FCS; I don't know if the Nile tools will be enough).

Sun seems to be already planning JavaFX 1.x, look at the checklist at java.com's "What's coming" link; there are several items listed but not checked for 1.0, things from "Cross-platform High-quality Video codecs" to all subitems of "Data handling" to "Better integration with NetBeans". Not to mention that JavaFX Mobile goes gold only by 1S09; at that time I suspect the tooling will have improved, Java SE will be at u11/u12 and u10+ will be much more available. Hopefully, more good stuff of 6u10+ will be available on Linux, and contributed to OpenJDK too. In the Apple front, perhaps Snow Leopard will move to 6u10+, perhaps Java FX Mobile will be available for iPhone and Android (these are harder wishes; I'd bet on mid'09 for announcements or alphas and late'09 / early'10 for deployment). So, the real kick-off for JavaFX's large scale success (supposing that it happens) adoption is my mid-2009 onwards. Or to be more exact, from JavaOne'09 onwards if Sun gets their act right. ;-)

[/quote]

Kumar Mettu replied on Wed, 2008/10/22 - 11:53am

@Ryan

1) Regarding the orange Java logo: This simply doesn't work. Even with Update 10 it doesn't work. It takes long time to load the Image (Image appears after a long grey background which really looks ugly). 

You can check Joshua's example shows that the feature is simple not usable:

http://projects.joshy.org/demos/AnimatedStartup/applet.html

 

Ryan Developer replied on Wed, 2008/10/22 - 12:36pm

If you add these attributes to that example, and change the animation to spinner_16.gif it looks fine:

<PARAM name="boxbgcolor" value="#FFFFFF">
<PARAM NAME="centerimage" VALUE="true">

There is a half second delay before the spinner shows, but that is not uncommon with Flash.

Have a look at these applets that set the default background colour to the same as the rest of the webpage (black) and show an animated gif immediately while the applet is loading:

http://www.interactivepulp.com/pulpcore/

http://www.interactivepulp.com/pulpcore/sketch/

Even on linux with Java 6 update 7 plugin this is indistinguishable from Flash. 

Ivan Lazarte replied on Wed, 2008/10/22 - 12:59pm

Wow, those preloaders are awesome!  Why doesn't Processing use something like that?  I'll have to check out this api...  For some reason the game applets don't load at all in Chrome though... will investigate later...

Kumar Mettu replied on Wed, 2008/10/22 - 1:22pm in response to:

@Ryan

  Those preloaders are really cool. Long live Applets :-)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.