PDA

View Full Version : Java for Firefox 3.6


dennylin93
January 16th, 2011, 05:41
The Java plugin installed by java/diablo-jre16 doesn't work with Firefox 3.6 anymore. Fortunately, an alternative plugin (IcedTea) can be installed using java/openjdk6.

cd /usr/ports/java/openjdk6/ && make config

Select WEB (do NOT select IPV6).

Note: The IcedTea plugin won't work if both WEB and IPV6 are selected (ports/153301 (http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/153301)).

make install clean

mount -t fdescfs fdesc /dev/fd

Add this to /etc/fstab so that it will be mounted automatically at boot:

fdesc /dev/fd fdescfs rw 0 0


Run the following command to make the plugin work:
ln -s /usr/local/openjdk6/jre/lib/IcedTeaPlugin.so ~/.mozilla/plugins/

Open Firefox and enter "about:plugins" in the URL bar and check if the IcedTea plugin has been detected.

Open http://www.java.com/en/download/help/testvm.xml to test if Java is working.

phoenix
January 16th, 2011, 22:44
Whoohoo! Thanks for the info. Unfortunately, this now means I have no excuse for not doing work from home. lol

volatilevoid
March 7th, 2011, 20:57
Hm, it seems that some applets are not compatible to IcedTea. :(
Otherwise it's working quite well...

jgh
March 12th, 2011, 02:26
This information is now found in the handbook, as well, at this location:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/desktop-browsers.html

aragon
March 12th, 2011, 16:48
This information is now found in the handbook, as well, at this location:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/desktop-browsers.html
I guess that's a big hint as to the state of the Diablo port. The Oracle effect in full force?

kronisk
March 31st, 2011, 07:27
Hm, it seems that some applets are not compatible to IcedTea. :(
Otherwise it's working quite well...

I had that exact problem, but I found a work around. The java plugin from the diablo 1.6 (libjavaplugin_oji.so) works with SeaMonkey. Hopefully someone can find this useful. All I did was install diablo 1.6 and make the appropriate symlink in ~/.mozilla/plugins and SeaMonkey worked after that. (about:plugin)

Java(TM) Plug-in 1.6.0_07-b02

File name: libjavaplugin_oji.so
Java(TM) Plug-in 1.6.0_07

Ruler2112
September 30th, 2011, 20:19
I followed the above directions on FreeBSD 8.2-amd64 and am having problems.

I don't even have the IcedTeaPlugin shared object file anywhere on my system after compiling/installing the openjdk6 port. I did not select IPV6, but there was no web option available in the config screen.


# ls -l /usr/local/openjdk6/jre/lib
total 56918
drwxr-xr-x 6 root wheel 1024 Sep 30 13:38 amd64
drwxr-xr-x 2 root wheel 512 Sep 30 13:37 applet
-rw-r--r-- 1 root wheel 2229 Sep 30 13:24 calendars.properties
-rw-r--r-- 1 root wheel 3475080 Sep 30 13:32 charsets.jar
-rw-r--r-- 1 root wheel 78263 Sep 30 13:22 classlist
drwxr-xr-x 2 root wheel 512 Sep 30 13:31 cmm
-rw-r--r-- 1 root wheel 5852 Sep 30 13:24 content-types.properties
-r--r--r-- 1 root wheel 4049 Sep 30 13:24 currency.data
drwxr-xr-x 2 root wheel 512 Sep 30 13:37 ext
-rw-r--r-- 1 root wheel 3835 Sep 30 13:25 flavormap.properties
-r--r--r-- 1 root wheel 3534 Sep 30 13:30 fontconfig.bfc
-rw-r--r-- 1 root wheel 7449 Sep 30 13:30 fontconfig.properties.src
drwxr-xr-x 2 root wheel 512 Sep 30 13:33 im
drwxr-xr-x 3 root wheel 512 Sep 30 13:25 images
-rw-r--r-- 1 root wheel 85432 Sep 30 13:28 jce.jar
-rw-r--r-- 1 root wheel 445039 Sep 30 13:37 jsse.jar
-rw-r--r-- 1 root wheel 4226 Sep 30 13:25 jvm.hprof.txt
-rw-r--r-- 1 root wheel 2245 Sep 30 13:26 logging.properties
drwxr-xr-x 2 root wheel 512 Sep 30 13:32 management
-rw-r--r-- 1 root wheel 382 Sep 30 13:26 management-agent.jar
-rw-r--r-- 1 root wheel 1722 Sep 30 13:37 meta-index
-rw-r--r-- 1 root wheel 3070 Sep 30 13:26 net.properties
-rw-r--r-- 1 root wheel 3791 Sep 30 13:27 psfont.properties.ja
-rw-r--r-- 1 root wheel 11388 Sep 30 13:27 psfontj2d.properties
-rw-r--r-- 1 root wheel 1053383 Sep 30 13:37 resources.jar
-rw-r--r-- 1 root wheel 52907137 Sep 30 13:37 rt.jar
drwxr-xr-x 2 root wheel 512 Sep 30 13:28 security
-rw-r--r-- 1 root wheel 1210 Sep 30 13:27 sound.properties
drwxr-xr-x 13 root wheel 512 Sep 30 13:29 zi

# ls -l /usr/local/openjdk6/jre/lib/amd64
total 4528
drwxr-xr-x 2 root wheel 512 Sep 30 13:38 headless
-rwxr-xr-x 1 root wheel 8589 Sep 30 13:26 jexec
-rw-r--r-- 1 root wheel 1674 Sep 30 13:24 jvm.cfg
-rwxr-xr-x 1 root wheel 12028 Sep 30 13:38 libattach.so
-rwxr-xr-x 1 root wheel 727510 Sep 30 13:38 libawt.so
-rwxr-xr-x 1 root wheel 26011 Sep 30 13:38 libdt_socket.so
-rwxr-xr-x 1 root wheel 368838 Sep 30 13:38 libfontmanager.so
-rwxr-xr-x 1 root wheel 236111 Sep 30 13:38 libhprof.so
-rwxr-xr-x 1 root wheel 68123 Sep 30 13:38 libinstrument.so
-rwxr-xr-x 1 root wheel 50212 Sep 30 13:38 libj2gss.so
-rwxr-xr-x 1 root wheel 14994 Sep 30 13:38 libj2pcsc.so
-rwxr-xr-x 1 root wheel 78187 Sep 30 13:38 libj2pkcs11.so
-rwxr-xr-x 1 root wheel 8398 Sep 30 13:38 libjaas_unix.so
-rwxr-xr-x 1 root wheel 214540 Sep 30 13:38 libjava.so
-rwxr-xr-x 1 root wheel 25683 Sep 30 13:38 libjava_crw_demo.so
-rwxr-xr-x 1 root wheel 6903 Sep 30 13:38 libjawt.so
-rwxr-xr-x 1 root wheel 296958 Sep 30 13:38 libjdwp.so
-rwxr-xr-x 1 root wheel 19233 Sep 30 13:38 libjli.so
-rwxr-xr-x 1 root wheel 211096 Sep 30 13:38 libjpeg.so
-rwxr-xr-x 1 root wheel 10670 Sep 30 13:38 libjsig.so
-rwxr-xr-x 1 root wheel 32567 Sep 30 13:38 libjsound.so
-rwxr-xr-x 1 root wheel 254116 Sep 30 13:38 liblcms.so
-rwxr-xr-x 1 root wheel 40870 Sep 30 13:38 libmanagement.so
-rwxr-xr-x 1 root wheel 846084 Sep 30 13:38 libmlib_image.so
-rwxr-xr-x 1 root wheel 98571 Sep 30 13:38 libnet.so
-rwxr-xr-x 1 root wheel 43041 Sep 30 13:38 libnio.so
-rwxr-xr-x 1 root wheel 16461 Sep 30 13:38 libnpt.so
-rwxr-xr-x 1 root wheel 6437 Sep 30 13:38 librmi.so
-rwxr-xr-x 1 root wheel 46505 Sep 30 13:38 libsaproc.so
-rwxr-xr-x 1 root wheel 385509 Sep 30 13:38 libsplashscreen.so
-rwxr-xr-x 1 root wheel 111113 Sep 30 13:38 libunpack.so
-rwxr-xr-x 1 root wheel 67786 Sep 30 13:38 libverify.so
-rwxr-xr-x 1 root wheel 37921 Sep 30 13:38 libzip.so
drwxr-xr-x 2 root wheel 512 Sep 30 13:38 native_threads
drwxr-xr-x 2 root wheel 512 Sep 30 13:38 server
drwxr-xr-x 2 root wheel 512 Sep 30 13:38 xawt

# find / -name IcedTeaPlugin.so -print
#



I'm using the firefox36 port, but without the shared object file, the plugin obviously won't work. The libjavaplugin_oji.so file does exist (twice), but it doesn't show up when there's a symbolic link in the ~/.mozilla/plugins directory.


# find /usr -name libjavaplugin_oji.so -print
/usr/local/diablo-jdk1.6.0/jre/plugin/amd64/ns7/libjavaplugin_oji.so
/usr/local/jdk1.6.0/jre/plugin/amd64/ns7/libjavaplugin_oji.so



Any ideas?

Ruler2112
September 30th, 2011, 21:25
Found the solution.

After googling for a while, I ran across this on freshports:


- Remove obsolete WEB option. Note the functionality is now moved to a new
port java/icedtea-web, which depends on ICEDTEA option of this port.


Great - somebody spun off part of the functionality into another port so they could get rid of the option. Ah well - nothing like a little headache. Off I went and compiled the referenced port. Had to use make -DDISABLE_VULNERABILITIES because one of the ports has vulnerabilities listed in portaudit and there's apparently no update for it yet. After installing it, the IcedTeaPlugin.so existed on my system, though not in the location referenced above.


# find /usr -name IcedTeaPlugin.so -print
/usr/local/lib/IcedTeaPlugin.so
/usr/local/lib/browser_plugins/symlinks/gecko18/IcedTeaPlugin.so
/usr/local/lib/browser_plugins/symlinks/gecko19/IcedTeaPlugin.so
/usr/local/lib/browser_plugins/symlinks/opera/IcedTeaPlugin.so
/usr/local/lib/browser_plugins/symlinks/opera-devel/IcedTeaPlugin.so
/usr/local/lib/browser_plugins/symlinks/webkit-gtk2/IcedTeaPlugin.so


I created a symbolic link to /usr/local/lib/IcedTeaPlugin.so in ~/.mozilla/.plugins, restarted Firefox, and about:plugins now reports that the Java plugin is installed.

tingo
October 8th, 2011, 14:40
Simply installing java/icedtea-web and refreshing the plugins in Opera (11.51) made Java work there. Thanks!
Update: and it "automagically" works i Firefox (6.0.2) also - no special steps required.
All this on a machine running FreeBSD 8.2-stable:
tingo@kg-v2$ uname -a
FreeBSD kg-v2.kg4.no 8.2-STABLE FreeBSD 8.2-STABLE #4: Sat Jul 16 02:07:14 CEST 2011
root@kg-v2.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64
Ah, peace and quiet again...