Ruarí's thoughts

Java still not working?

, ,

Some users of the *nix 10.5x+ Snapshots and Betas have mentioned having problems with Java after our recent switch to using the Java browser plugin rather than interfacing more directly with the JRE. Often this is because they did not have the browser plugin package installed and hence no browser on their system (except for older versions Opera) would work with Java. To remedy this a user needs to install one of the Java browser plugin packages.

The most popular browser plugins are Oracle/Sun's Java plugin and the OpenJDK/IcedTea plugin. The most recent versions of these typically have plugin files called either 'libnpjp2.so' or 'IcedTeaPlugin.so'. If you are unsure which package will provide these files, they will likely be named along the following lines:

Oracle/Sun's Java plugin = java-1.6.0-sun-plugin, java-1_6_0-sun-plugin, jre, etc.
OpenJDK/IcedTea plugin = java-1.6.0-openjdk-plugin, icedtea6-plugin, etc.

Alternatively, many distro package managers provide a way to search for package names by looking for files included within them, even if that package is not yet installed. For example:

Fedora/YUM = yum provides "*/file"
Mandriva/Urpmi = urpmf file
Debian based distros (including Ubtuntu)/APT = apt-file search file
(note: simply replace 'file' with either libnpjp2.so or IcedTeaPlugin.so)

Finally, if all else fails you can download directly from Oracle/Sun's Java download page.

Once you have installed an appropriate Java browser plugin package you can test if Java works via the Java test page.

If the Java browser plugin package you installed has not placed the plugin file (or a symlink to it) into one of the standard browser plugin paths, then Java might still not work. You can remedy this situation by creating your own symlink. After installing either Java plugin package, issue the following command to locate where the plugin file was placed on your system:
find / \( -name libnpjp2.so -o -name IcedTeaPlugin.so \) -type f -print 2>/dev/null

Assuming a result such as:
/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/i386/libnpjp2.so
An appropriate symlink can be setup as follows:

If Opera was installed via a .deb or .rpm file, issue the following:
ln -s /usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/i386/libnpjp2.so /usr/lib/opera/plugins/libnpjp2.so
(note: You will need to run this command as root or preface it with sudo)

If Opera was installed via the tar package install script into the system:
ln -s /usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/i386/libnpjp2.so /usr/local/lib/opera/plugins/libnpjp2.so
(note: You will need to run this command as root or preface it with sudo)

If Opera was installed via the tar package install script into the user account:
ln -s /usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/i386/libnpjp2.so $HOME/.local/lib/opera/plugins/libnpjp2.so

Java should now be detected. If not, please post below mentioning the distribution you use (including version) and the Java browser plugin package that you installed. It is also worth mentioning how you installed Opera (.deb, .rpm, .tar [system or user, with or without a suffix]) and if you have confirmed Java works in another browser (if so which one).

64bit SUSE users should also block NSPluginWrapper in OperaThristy for some IcedTea? Perhaps you should try a hot cup of (Oracle) Java instead!

Comments

Ruarí Ødegaardruario Friday, June 18, 2010 6:53:55 AM

I wanted to include a find by file name command for openSUSE but 'zypper wp file' seems to only work for packages that are already installed. If someone knows another method that will work on openSUSE (even when a package is not yet installed) then I would appreciate you letting me know what it is! wink

Шуйский Николай [krigstask, Ŝtérkrìg]Sterkrig Friday, June 18, 2010 8:44:21 AM

If you are unsure which package will provide these files…


In Gentoo one needs to install his/her virtual/jre of choice with nsplugin USE-flag enabled.

Ruarí Ødegaardruario Friday, June 18, 2010 8:48:37 AM

@Sterkrig: Thanks for that! wink

enzolatina Friday, June 18, 2010 9:27:49 AM

hi ruario, here java not work:
archlinux x86_64 2.6.34, openjdk 6.b18_1.8, opera 6372
[enzo@archenzo:~]% ls -al /usr/lib/opera/plugins

lrwxrwxrwx 1 root root   58 18 giu 10.56 libnpjp2.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/IcedTeaPlugin.so*

launchin opera from console, i have
 opera
/tmp/openjdk6/trunk/src/icedtea6-1.8/plugin/icedteanp/IcedTeaNPPlugin.cc:2251: thread 0x13bea80: Error: Unknown plugin value requested.
*** glibc detected *** /usr/lib/opera//operapluginwrapper-native: free(): invalid pointer: 0x00000000014288d0 ***
======= Backtrace: =========
/lib/libc.so.6(+0x71656)[0x7f4805107656]
/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/IcedTeaPlugin.so(NP_Initialize+0x78b)[0x7f47ff3f7a8b]
/usr/lib/opera//operapluginwrapper-native(_ZN6Handle4OpenEPKcP16_NPNetscapeFuncs+0x112)[0x40f3d2]
/usr/lib/opera//operapluginwrapper-native(main+0x392)[0x40f8f2]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f48050b4c4d]
/usr/lib/opera//operapluginwrapper-native[0x40eaf9]
======= Memory map: ========
00400000-00431000 r-xp 00000000 08:03 532471                             /usr/lib/opera/operapluginwrapper-native
00630000-00631000 rw-p 00030000 08:03 532471                             /usr/lib/opera/operapluginwrapper-native
00631000-00632000 rw-p 00000000 00:00 0 
013a4000-01448000 rw-p 00000000 00:00 0                                  [heap]
...
...
...
7f47fdd13000-7f47fdf12000 ---p 00004000 08:03 917130                     /usr/lib/xulrunner-1.9.2/libxpcom.soopera: Plug-in 3959 is not responding. It will be closed.
opera: Define environment variable OPERA_KEEP_BLOCKED_PLUGIN to keep blocked plug-ins.
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8) (ArchLinux-6.b18_1.8-1-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)


any ideas on this?

Ruarí Ødegaardruario Friday, June 18, 2010 9:44:18 AM

Originally posted by enzolatina:

hi ruario, here java not work:
archlinux x86_64 2.6.34, openjdk 6.b18_1.8, opera 6372

Yes actually I do. It would seem that we have some issues with the OpenJDK/IcedTea plugin that I was not aware of as I wrote this. There is a bug already logged.

I'm sure we'll fix the issue but in mean time if you need Java support in Opera you will need to use Oracle/Sun's Java plugin. On Arch that package is simply called 'jre' (though you probably already worked that out!).

enzolatina Friday, June 18, 2010 10:16:08 AM

ty ruario, we wait until the bug is fix...
i do not really need java and, if necessary, i have firefox
enzolatina

miki100 Friday, June 18, 2010 2:36:29 PM

Java is also not working on openSUSE 11.3. I tried OpenJDK/IcedTea and Oracle/Sun plugins. Some problems with pluginwrapper on openSUSE 11.3, I presume confused . Sadly, the only output is :
"opera: Plug-in 3283 is not responding. It will be closed.
opera: Define environment variable OPERA_KEEP_BLOCKED_PLUGIN to keep blocked plug-ins."
openSUSE 11.3 RC1, KDE 4.5 Beta2, Opera 10.60-6372 i386

Unregistered user Wednesday, June 23, 2010 6:56:07 PM

Anonym writes: >>> steer clear of the IcedTea plugin So you need no further reports regarding non-working icedtea plugin on Mandriva 2010.0 64-bit platform? On my system, only Firefox 3.6.3 and Opera 10.10 recognize openjdk java, Opera 10.50, 10.60, Chromium 6.0.415 and Epiphany don't. /usr/lib64/mozilla/plugins/libjavaplugin.so linked to /etc/alternatives/libjavaplugin.so.x86_64 linked to /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/lib/amd64/IcedTeaPlugin.so Sun java is not (and has never been) installed.

Ruarí Ødegaardruario Thursday, June 24, 2010 5:47:51 AM

Originally posted by anonymous:

On my system, only Firefox 3.6.3 and Opera 10.10 recognize openjdk java, Opera 10.50, 10.60, Chromium 6.0.415 and Epiphany don't.

The plugin seems to have been coded with FF in mind given it relives on FF components. Opera 10.10 is somewhat irrelevant as it is the only browser listed that does not use the browser plugin. The fact that Opera 10.6x, Chromium 6.0.415 and Epiphany don't see it implies to me that something is broken. Did you run ldd against:

/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/lib/amd64/IcedTeaPlugin.so

Unregistered user Thursday, June 24, 2010 6:32:34 PM

Anonym writes: >>> Did you run ldd against: /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/lib/amd64/IcedTeaPlugin.so full output: http://www.loaditup.de/files/509848.txt libxul.so => not found libxpcom.so => not found # locate libxpcom.so /usr/lib64/xulrunner-1.9.2.3/libxpcom.so /usr/lib64/xulrunner-1.9.2.4/libxpcom.so # locate libxul.so /usr/lib64/xulrunner-1.9.2.3/libxul.so /usr/lib64/xulrunner-1.9.2.4/libxul.so Is that the problem? Is there a way to fix it? Thanks :)

Ruarí Ødegaardruario Thursday, June 24, 2010 7:58:17 PM

Originally posted by anonymous:

Is that the problem? Is there a way to fix it?


yes, read this:

http://my.opera.com/ruario/blog/2010/06/19/thristy-for-some-icedtea-perhaps-you-should-try-a-hot-cup-of-java

Unregistered user Friday, June 25, 2010 2:33:12 AM

Anonym writes: >>> yes, read this That's bad. Since fonts are still garbled on Mandriva, i will wait for final release and see how things are going with openjdk. It would be nice to sea icedtea working since openjdk is the default java package on Mandriva. I can change to sun java, but the 'default' user will most likely have no idea why java is not working with Opera on a basic system.

mfbd Saturday, June 26, 2010 9:42:42 AM

thank you for the hints to get the sun-java-plugin working fine with opera 10.60 (64) on opensuse 11.2 (64) kde 4.4.4!
the icedtea-plugin doesn't work in fact on my machine

markus-v Saturday, July 10, 2010 12:30:02 AM

Ruari: Today I upgraded from Mandriva 2010.0 to 2010.1 (64 bit) and now Openjdk Java is recognized by Opera 10.6 and works!

http://img149.imageshack.us/img149/2204/icedtea.png

Unregistered user Tuesday, July 13, 2010 10:39:39 AM

przemeq writes: Hi all, For all those who've been struggling with Opera 10.60 and Java sun-jre-bin 1.6 like myself: here is what *worked* for me on Gentoo. *) make sure you've emerged your JRE with USE="nsplugin" *) go to Preferences->Advanced->Content // I _didn't_ have any "enable Java" checkbox nor "Java options" button // as it used to be in Opera 10.1 *) click "Plugin Preferences" -> "Change Paths" *) click "Add new" and point to the directory where your current JVM installation is // in my case it was /etc/java-config-2/current-system-vm/lib/i386/ *) the Java(TM) Plugin should be detected in "active plugins" window reboot for the sake of it... works like charm and Opera doesn't complain when started from the console. // it used to say: // Didn't find JVM under /home/przemek/.opera/plugins // The condition 'foundJVM' wasn't met Hope that helps :)

vivus-ignis Thursday, July 15, 2010 8:31:41 AM

Hi all,
i have opera 10.60/6386 on archlinux, jre package installed. opera:plugins shows that java plugin has been recognized correctly, but following the test link (http://www.opera.com/media/applets/clock/) gives nothing but a grey box instead of an applet contents. Tools -> Quick Preferences shows 'Enable Java' dimmed.
Also tried installing jre from an oracle official site installer and pointing opera to a directory with plugin .so doesnt help either.
No warnings when launching opera from console.
Does anybody has suggestions? Any ideas would be appreciated.

enzolatina Friday, July 16, 2010 9:42:55 PM

after the last openjdk upgrade (6.b18_0.hg_20100715-1 archlinux), seems the applet work on opera (the Java test page now gives a positive result

vivus-ignis Friday, July 16, 2010 9:51:28 PM

Works indeed, thank you, Perer.

Unregistered user Monday, September 20, 2010 4:05:44 AM

Anonymous writes: Ubuntu 10.04 Java 6. Opera 10.62 attempted all the above. Java site confirms the jre is properly installed. but, applets do not run in Opera.

Unregistered user Monday, September 20, 2010 4:42:03 AM

Anonymous writes: follow up. another user informed me to check for broken symlinks. sure enough, the link was broken. re-installed the Opera*.deb file. using sudo with terminal, I deleted the *.so file and re-established the link per above. very happy to say Java applet now working. my thanks.

Unregistered user Monday, November 8, 2010 5:34:13 PM

Claudio writes: If you have Opera on OpenSuse, you must install: "java-1_6_0-sun-plugin - Browser plugin files for java-1_6_0-sun" or the similar for javaOpenJDK, via Yast.... I was going crazy for this issue.... I hope this could be helpful

k561 Wednesday, December 29, 2010 10:42:49 AM

Unregistered user Monday, January 24, 2011 10:43:10 AM

Anonymous writes: Thank you, I got the java plugin working in suse 11.3/opera 11 thanks to this :)

Unregistered user Monday, January 24, 2011 10:44:44 AM

Anonymous writes: thank you I gotit working on opera 11 with suse 11.3 :)

Unregistered user Monday, January 24, 2011 10:45:09 AM

Anonymous writes: thank you I got it working on opera 11 with suse 11.3 :)

Unregistered user Monday, January 24, 2011 10:45:55 AM

Anonymous writes: thank you I gotit working on opera 11 with suse 11.3 :)

Unregistered user Monday, January 24, 2011 10:47:24 AM

Anonymous writes: thank you I got it working on opera 11 with suse 11.3 :)

Unregistered user Monday, January 24, 2011 10:48:21 AM

Anonymous writes: thank you I got it working on opera 11 with suse 11.3 :)

Unregistered user Monday, January 24, 2011 10:49:34 AM

Anonymous writes: thank you I got it working on opera 11 with suse 11.3 :)

Unregistered user Monday, January 24, 2011 10:49:58 AM

Anonymous writes: thank you I got it working on opera 11 with suse 11.3 :)

Unregistered user Monday, January 24, 2011 10:51:12 AM

Anonymous writes: thank you I got it working on opera 11 with suse 11.3 :)

Unregistered user Monday, January 24, 2011 10:51:41 AM

Anonymous writes: thank you I got it working on opera 11 with suse 11.3 :)

Unregistered user Monday, January 24, 2011 10:54:16 AM

Anonymous writes: thank you I got it working on opera 11 with suse 11.3 :) note: I lost 10 minutes trying to get the stupid words right...I ended up using the audio challenge...seriously what the hell is wrong with you people !!!

Unregistered user Monday, January 24, 2011 10:55:55 AM

Anonymous writes: thank you I got it working on opera 11 with suse 11.3 :) note: I lost 10 minutes trying to get the stupid words right...I ended up using the audio challenge...seriously what the hell is wrong with you people !!! white house friday tuesday

Unregistered user Tuesday, May 31, 2011 6:54:52 PM

Jii writes: I got Java working in the following way in Opera 10.61 in Ubuntu 10.10: -Click System, Preferences, Sun Java 6 Plugin Control Panel. -Click System tab, look at Path. This is a clue to the Java installation directory. Mine said /usr/lib/jvm/java-6-sun-1.6.0.24/jre/bin/java. -Now in Opera, press ctrl + F12 or click Menu, Settings, Preferences. -Click Advanced, Content, Plugin Options. -Click Change Path, then click Add. -Search for the lib. I found mine in usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/amd64 since I am on a 64 bit machine. You should see a bunch of .so files in there. Go into that directory and then click Open. -Now click Find New and Opera should find the lib files it needs, and you should see the Java plugin show up in the list. Mine says Java (TM) Plugin 1.6.0_24. -Now restart Opera (I dunno if it's required), and go to http://www.java.com/en/download/testjava.jsp and see if the plugin loads. If so, it's working! Thanks to Anonymous #13 for the helpful clues!

Unregistered user Tuesday, May 31, 2011 7:16:23 PM

Jii writes: Sorry, in the Java Plugin Control Panel, you click the Java tab, then View, and THEN you can click the System tab and look at the Path.

Unregistered user Thursday, January 17, 2013 5:23:22 AM

Anonymous writes: I tried to get opera working with Oracles java flash, no go. Tried to copy paste the libnjpj2.so from the default /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so to the /usr/lib/opera/plugins using nautilus as superuser. Still did not work. Tried a symbolic link by mounting the /usr/lib/opera/plugin to the libnpjp2.so to the above first directory I listed. It returned a 200 link error. What am I doing wrong? I purged the iced tea java along with the java in the mozilla folder. Does Opera need the libnpjp2.so in that folder also?

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies