LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Java not working with iceweasel (http://www.linuxquestions.org/questions/debian-26/java-not-working-with-iceweasel-927230/)

cccc 02-02-2012 01:58 PM

Java not working with iceweasel
 
hi

I've Squeeze with Gnome and I'm using iceweasel browser.
I've installed sun-java6-jre and sun-java6-plugin, but java in iceweasel doesn't work.
BTW Java is enabled in the browser settings.

Code:

# java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

# update-alternatives --config java
There is only one alternative in link group java: /usr/lib/jvm/java-6-sun/jre/bin/java
Nothing to configure.


cccc 02-02-2012 07:55 PM

I've solved this problem, the link to java plugin, installed automatically seems to be not OK:
Code:

# ls -la /etc/alternatives/iceweasel-javaplugin.so
lrwxrwxrwx 1 root root 48 Feb  2 18:57 /etc/alternatives/iceweasel-javaplugin.so -> /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so
# mv /etc/alternatives/iceweasel-javaplugin.so /etc/alternatives/iceweasel-javaplugin.so_old
# ln -s /usr/lib/jvm/java-6-sun-1.6.0.26/jre/plugin/i386/ns7 /etc/alternatives/iceweasel-javaplugin.so

Now it works well!

mikefranklet 03-13-2012 08:24 PM

Didn't work for me
 
I'm using the same version of java.
Followed this, but it still doesn't work for me :(
My little brother wants to play java games. Do you have any alternate ideas for what might fix it?

craigevil 03-13-2012 08:44 PM

Quote:

Originally Posted by mikefranklet (Post 4626201)
I'm using the same version of java.
Followed this, but it still doesn't work for me :(
My little brother wants to play java games. Do you have any alternate ideas for what might fix it?


Run the following commands as root:
update-alternatives --config java
update-alternatives --config javac

symlink the Java plugin as root
cd /usr/lib/mozilla/plugins/

Followed by :
ln -s /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so

You could also try using OpenJDK or follow the Howto in my LQ blog and install Oracle's Java.

malayo 07-07-2012 08:20 PM

thanks craigevil

my steps based on your method, which works for wheezy amd64

1. download jre from http://www.oracle.com/technetwork/ja...ads/index.html
2. extract to /opt

# tar -xvf jre-7u5-linux-x64.tar.gz -C /opt/

3. symlink to mozilla plugins folder

# cd /usr/lib/mozilla/plugins/
# ln -s /opt/jre1.7.0_05/lib/amd64/libnpjp2.so

4. restart Iceweasel

globulon 09-23-2012 12:20 PM

Thanks for posting this answer craigevil and thanks for the breakdown malayo! I followed the procedure and it solved the problem.

malayo 09-23-2012 12:25 PM

glad it helps


All times are GMT -5. The time now is 06:34 PM.