How to use Java in Firefox

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
trope
Level 4
Level 4
Posts: 320
Joined: Tue Feb 19, 2013 1:10 pm

How to use Java in Firefox

Post by trope »

I am trying to use an application in Firefox that requires Java and I'm wondering if I don't have it or it isn't installed properly. I also tried going to a java test page to tell me what version and nothing loads. I am using Linux Mint 14 (Nadia) and Firefox. I found the following command while browsing which should show versions of Java installed, but I don't know how to interpret the output.

update-java-alternatives -l

java-1.6.0-openjdk-amd64 1061 /usr/lib/jvm/java-1.6.0-openjdk-amd64
java-1.7.0-openjdk-amd64 1071 /usr/lib/jvm/java-1.7.0-openjdk-amd64
java-gcj-4.7 /usr/lib/jvm/java-gcj-4.7

What are the next steps to get it to work in my browser? Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
ajgreeny
Level 7
Level 7
Posts: 1656
Joined: Mon Nov 19, 2007 3:27 pm

Re: How to use Java in Firefox

Post by ajgreeny »

You need to install the icedtea-7-plugin for the browser, and I think you should probably need openjdk-7-jre as well, if you haven't got them.
trope
Level 4
Level 4
Posts: 320
Joined: Tue Feb 19, 2013 1:10 pm

Re: How to use Java in Firefox

Post by trope »

I followed all the instructions on this page:

http://community.linuxmint.com/tutorial/view/1091

and when I tried the "about:plugins" step it does list the icedtea plugin so I think it is installed. However the last step

Code: Select all

ln -s /opt/java/64/jre1.7.0_09/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
did not work, I get the error message

Code: Select all

ln: failed to create symbolic link `/home/max/.mozilla/plugins/libnpjp2.so': Permission denied
I reopened firefox and the java test still does not work. The icedtea plugin is listed in the plugins section. Appreciate anything else I can try.
trope
Level 4
Level 4
Posts: 320
Joined: Tue Feb 19, 2013 1:10 pm

Re: How to use Java in Firefox

Post by trope »

The java test does not work in Chrome either (icedtea plugin installed), which leads me to believe that Java is not installed properly on my computer?
palo
Level 4
Level 4
Posts: 476
Joined: Mon Jun 25, 2012 7:28 am
Location: Walking on sunshine

Re: How to use Java in Firefox

Post by palo »

Hi trope. It looks like things are a bit muddled with a mix of Oracle and Open java on your setup.

Firstly the disadvantage to installing Oracle java from the tutorial (aside from the possibility of making a mistake in any one of the many steps), is that you will manually have to install an updated version when it is released. I have the installer from a PPA for some time which has been hassle free and updates are done automatically. You can do this by following the instructions here.

Once that is done you can open Synaptic and search icedtea then completely remove any of that you have installed. Then check to see if your browsers are set to use the java. I keep mine off so I have to intentionally enable it to be used on a site. It is extra work but a good security step, and recommended.

Firefox - go to addons>plugins and find Java Plug-in 10.51.2 - the options are Always Activate, Never Activate and Ask to Activate(recommended). When set to Ask, going to the "check" site will still show a problem until you click in the box and follow the next dialogue to give it permission.

Chrome - In the address bar type about:plugins. Find java and see if it is set to Enable - if you do not check Always allowed you will be able to allow on a per use basis.

Also version check in a terminal should show this:

Code: Select all

 ~ $ java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Server VM (build 24.51-b03, mixed mode)
Next comes LibreOffice - it needs to have java recognized to function properly. Open Writer - go to Tools>Options and click on Java giving it a few moments for discovery. You will likely see only the version you installed.

Hth
Pat
trope
Level 4
Level 4
Posts: 320
Joined: Tue Feb 19, 2013 1:10 pm

Re: How to use Java in Firefox

Post by trope »

Worked great, thanks! Also got to read about PPAs, was not familiar with them.
Locked

Return to “Beginner Questions”