Skip to main content

deployment toolkit does not detect plugin2 on ubuntu

12 replies [Last post]
mbien
Offline
Joined: 2007-04-29
Points: 0

I think I found a bug, could someone verify it?

I have 6u10 b33 installed, browser is FF3 on ubuntu 8.10, dragable applets and everything works but deployment toolkit is not able to detect the next gen plugin. (works on windows)

Here is a test page which prints out all JREs (getJREs()) and detects if plugin2 enabled (isPlugin2()).

my results:
Java: 1.6.0
plugin2: false

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jstansel
Offline
Joined: 2007-04-26
Points: 0

I have a javascript snippet that returns 1.6.0_11 on my ubuntu box. It does this by looking for the jpi-version mimetype. It should also be able to return true for isPlugin2, based on the plugin's filename.

If anyone is interested in this snippet I'd be glad to post it; just let me know.

-james.

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

> If anyone is interested in this snippet I'd be glad
> to post it; just let me know.
I am interested ;)

jstansel
Offline
Joined: 2007-04-26
Points: 0

Consider this a proof of concept. It works for me with Firefox3 on Ubuntu Hardy. I believe it should work with any mozilla flavor and any sun java plugin for Linux or Solaris going back to Java 1.4. But of course completely untested there.

Adding appropriate error handling is left as an exercise for the reader, as is comparing the plugin fileName property against npjp2 to determine that the plugin2 is present. Also, I believe a variation of this could work with the mozilla family on windows, but my memory suggests that the mimetype/plugin mapping is different there.

[code]
var ver;
var p = navigator.mimeTypes["application/x-java-applet"].enabledPlugin;
re=/application\/x-java-applet;jpi-version=(.*)/;
for (i=0; i<p.length; i++){
if (r = re.exec(p[ i ].type)) {
ver = r[1];
break;
}
}
[/code]

(sorry, I couldn't figure out how to keep the formatting intact)

escaped a <

Message was edited by: jstansel

Message was edited by: jstansel

Message was edited by: jstansel

Message was edited by: jstansel

why won't p[i].type show up?

Message was edited by: jstansel

Message was edited by: jstansel

Message was edited by: jstansel

fix formatting

Message was edited by: jstansel

jstansel
Offline
Joined: 2007-04-26
Points: 0

I'm a little surprised. It seems to work unchanged on Win/XP in Firefox3 with Java 6u11 using the plugin2 plugin.

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

thank you jstansel, works perfectly.

to keep the formatting intact embed your snipped in
[kode]
[/kode]
and replace 'k' with 'c' ;)

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

i updated my testpage:
http://people.fh-landshut.de/~mbien/cafebabe.html

it uses now both mechanisms deployment toolkit and jstansel's mimetype query.

rogyeu
Offline
Joined: 2006-07-30
Points: 0

This is where the DT plugin comes to play in response to deployJava functions. Currently, the DT plugin is only available on Windows. Therefore, deployJava.getJREs() only returns 1.6.0, but not the update release info.

You can distinguish the detection behavior by detecting user's OS with JavaScript also.

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

> Currently, the DT plugin is
> only available on Windows.
thank you, wasn't aware of that

> Therefore,
> deployJava.getJREs() only returns 1.6.0, but not the
> update release info.
and it returns false for isPlugin2()....

jstansel
Offline
Joined: 2007-04-26
Points: 0

Yes, I have plugin2 enabled on ubuntu 8.10 and see what you described, except the plugin2: checkbox is simply unchecked.

BTW, these don't even attempt to detect plugin2, but they might still be of interest to you:

http://browserspy.dk/plugins.php?detail=1

http://browserspy.dk/java.php

Update: actually the plugins.php _does_ show that plugin2 is enabled, by listing "Filename: libnpjp2.so" - it just doesn't specifically interpret the information.

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

Someone in the other thread mentioned that there is a difference between the deployment toolkit browser plugin and the actual applet excecuting plugin.

This would explain where the issues come from and why its possible to have fully functional plugin2 but a not working deployment toolkit. This is probably the reason why i never got a linux visitor with update10 detected.

Thank you for the links, very usefull site.

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

mbien,

While that is true (the existence of plugin2 is not the same as the existence of the deployment toolkit plugin) I am wondering why your configuration isn't being detected anyway. I mean, if you are running Java6 update 10 then Linux or not your configuration should be getting detected right?

Can you please file a bug report for this?

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

as jstansel already said u10 will be installed automatically if you update to ubuntu 8.10 (AFAIK the precondition is a already installed sun sdk - not sure) but it uses still the old plugin because of a packaging bug (i can't find the bug report right now...).

(this was IMO a unique opportunity to get desktop java correctly deployed on a mainstream linux distribution)

early access veterans know how to rewire the next gen plugin correctly but I wasn't aware until now that there is an yet other thing to rewire...