PDA

View Full Version : How to easily get Java and Flash working in Iceweasel, Firefox, Chromium, etc.



jerichodotm
2013-03-23, 09:39
First, don't worry if you have Java 6 and Java 7 both on your system for now. You can use the command update-alternatives to ensure javac, jdb, jar, etc. etc. are properly linked to their Java 7 versions rather than their Java 6 versions but that is beyond the scope of this post. We are soley focusing on the Java plugin for your web browser and not worried with compiling Java programs, using Java to connecet to databases, etc.

Configuring Java

Do all of this as root.

Assuming you are using a 64bit machine, install the following packages from the repository:

1. openjdk-7-jre - OpenJDK Java runtime, using Hotspot JIT (7u3-2.1.3-1)

This installs into the /usr/lib/jvm/java-7-openjdk-amd64 directory.

*If you are using a 32bit machine you want to instead install the openjdk-7-jre-lib package and when you see amd64 below, use common instead. For example, the 32bit package installs into the /usr/lib/jvm/java-7-openjdk-common directory.

2. icedtea-7-plugin - web browser plugin based on OpenJDK and IcedTea to execute Java applets (1.3.1-2.1)

This installs into the same directory tree as the first install but adds /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so, which is the browser plugin.

Once those are installed, go to the /etc/alternatives directory and create this soft link:


root@shutupkyle:/etc/alternatives# ln -s /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so > mozilla-javaplugin.so

While still in /etc/alternatives, issue the command ls -la mozilla-javaplugin.so to double check your work. The output should look like this:


lrwxrwxrwx 1 root root 64 Mar 23 02:30 mozilla-javaplugin.so -> /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so

Now we just need to create the link in the browser plugins directory back to /etc/alternatives/mozilla-javaplugin.so. Go to the /usr/lib/mozilla/plugins directory and create this soft link:


root@shutupkyle:/usr/lib/mozilla/plugins# ln -s /etc/alternatives/mozilla-javaplugin.so > mozilla-javaplugin.so

While still in /usr/lib/mozilla/plugins, issue the command ls -la mozilla-javaplugin.so to double check your work. The output should look like this:


lrwxrwxrwx 1 root root 39 Mar 23 02:17 mozilla-javaplugin.so -> /etc/alternatives/mozilla-javaplugin.so

Finally, restart your browser and go to a Java test page (http://www.java.com/en/download/testjava.jsp) to verify it's working.


Configuring Flash

I couldn't explain it any easier than charonsecurity already did (http://forums.kali.org/showthread.php?287-How-to-install-Flash-Simple-steps!).

--

I hope this helps others. It took me hours to get it all straight.

lpaulmp
2013-09-10, 01:44
I follow the steps, all looks fine but Iceweasel is not recognizing the plugin, some idea why could be ?, I have installed Kali Linux 1.0.5 64-Bit with the last upgrades. How Iceweasel recognize java plugin?. :(

jerichodotm
2013-09-10, 16:46
Do you get an error?

dholoman
2013-09-27, 00:35
I get to here:


ln -s /etc/alternatives/mozilla-javaplugin.so > mozilla-javaplugin.so

and I get this:


ln: failed to create symbolic link `./mozilla-javaplugin.so': File exists

?

so I check it, as described in the article:


While still in /usr/lib/mozilla/plugins, issue the command ls -la mozilla-javaplugin.so to double check your work. The output should look like this:


lrwxrwxrwx 1 root root 39 Mar 23 02:17 mozilla-javaplugin.so -> /etc/alternatives/mozilla-javaplugin.so

I get this:


-rw-r--r-- 1 root root 0 Sep 25 22:51 mozilla-javaplugin.so


so, get rid of that and try again:

mv mozilla-javaplugin.so mozilla-javaplugin.so.was

confirm the old file is gone. check. issue this again:


ln -s /etc/alternatives/mozilla-javaplugin.so > mozilla-javaplugin.so

Same result. Does not make java work.

Any suggestions would be great, thanks. Brand new Kali install.

jerichodotm
2013-09-27, 19:09
I tested this with the current build and it's not working any longer. I confirmed this works though:

https://forums.kali.org/showthread.php?41-Installing-Java-on-Kali-Linux

cvdenzen
2014-05-13, 08:30
I get to here:


ln -s /etc/alternatives/mozilla-javaplugin.so > mozilla-javaplugin.so

and I get this:


ln: failed to create symbolic link `./mozilla-javaplugin.so': File exists

?

so I check it, as described in the article:


While still in /usr/lib/mozilla/plugins, issue the command ls -la mozilla-javaplugin.so to double check your work. The output should look like this:


lrwxrwxrwx 1 root root 39 Mar 23 02:17 mozilla-javaplugin.so -> /etc/alternatives/mozilla-javaplugin.so

I get this:


-rw-r--r-- 1 root root 0 Sep 25 22:51 mozilla-javaplugin.so


so, get rid of that and try again:

mv mozilla-javaplugin.so mozilla-javaplugin.so.was

confirm the old file is gone. check. issue this again:


ln -s /etc/alternatives/mozilla-javaplugin.so > mozilla-javaplugin.so

Same result. Does not make java work.

Any suggestions would be great, thanks. Brand new Kali install.
The > sign in the ln -s command is wrong. It should read "ln -s /etc/alternatives/mozilla-javaplugin.so mozilla-javaplugin.so"