Thursday 29 May 2014

Chrome and Java

If you use Chrome and are unfortunate enough to still have to use Java applets from time-to-time, you may recently have been unpleasantly surprised to find that the Java plug-in stopped working (if you use Linux), or you soon will be (if you use Windows; I don't know when/if this is happening on Macs).

Why? Because Chrome is discontinuing support for the venerable old NPAPI, the mechanism that the Java plug-in uses to hook into the browser, and Oracle hasn't released a Java plug-in using the newer PPAPI that Google touts.

"Does the browser tell you that?" you ask
No, it just acts like the plugin isn't installed at all.

"Not even if you enable the debug log with the verbose option?"

"Then what does it do?"
It shows you a message saying you need Java and gives you a link to Oracle's website to download it, even though doing so will do you no good whatsoever.

"Isn't that...just really amazingly stupid?"
Oh yes.

Let's be clear: I'm not saying discontinuing support for the NPAPI is a bad idea, just that doing so in such a half-baked fashion is about has hamfisted as it gets. I wasted far too much time trying to figure out why Java suddenly stopped working when a simple "Chrome no longer supports the plug-in you have installed to handle this content" with a link to this page would have told me what was going on.

Which is why I'm telling you, dear reader. :-) And you might want to join me in telling them to be more clear.

Tangent: But we shouldn't be using Java applets anyway, right? Well, there are some who would argue that, and certainly Oracle's botched handling of Java on the client (and Sun's before them) has done a lot over the years to destroy applets, and better in-browser options have reduced the need for them. But those significant codebases won't just update themselves, and there are still things you can do in a Java applet (signed applet, of course) that you just can't do otherwise. One of my clients uses a VPN that launches via a signed Java applet, for instance. I can't just tell them to get lost because Google decided NPAPI was a bad thing. Google's own figures show that they're inconveniencing 9% of their users by doing this. That ain't nuthin. So applets are niche, but still there.


Roger Pack said...

I presume you've told the google chrome people to make this more explicit?

T.J. Crowder said...

@Roger - I did in their support forum, but you're right, this deserves a proper bug report. So I've done that and added a link to the article. Thanks!

Mikko said...

I agree that the UI was bad. However, I do not agree that Java Applets are good idea for anything these days. Java Webstart is (and has been around the last 10 years) the technology you want to use if you need to distribute Java apps to end users.

T.J. Crowder said...

@Mikko - I never said Java applets were a good idea for anything these days. In fact, fairly sure I said the opposite. But sometimes you're stuck with them, usually on legacy projects.

Angel17 said...

I've only used Chrome. Will also try Java. Thanks for sharing! Lanai Rescreening North Port, FL