Firefox and java linux

How to Enable Java plugin support on Firefox on Linux

Many web pages use Java applets for interactive content such as online games, WebEx (Online meeting), etc. By default all the browsers disabled the plugin due to security issue and still you want to enable to access the trusted web sites. We can enable it on browser by following below procedures. Make sure you system should have installed Oracle JAVA before proceeding to enable the JAVA Applet.

Method 1 : Enable Java plugin Support on Firefox through Oracle Java

1) Install Oracle Java

Make sure you system should have installed Oracle JAVA before proceeding to enable the JAVA Applet.

# java -version java version "1.8.0_74" Java(TM) SE Runtime Environment (build 1.8.0_74-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)

2) Locate Firefox

First we need to locate the Firefox installation location to create plugin directory.

# whereis firefox firefox: /usr/bin/firefox /usr/lib/firefox /etc/firefox /usr/share/man/man1/firefox.1.gz

3) Enable Java applet on Firefox

Navigate to Menu >> Add-ons >> Plugins >> Oracle JAVA, Search Java(TM) Platform, If Java is disabled, click on Never Activate to open its drop-down menu and select the option to activate Java. The recommended (default) option is Ask to Activate, which lets you run Java when prompted.

Читайте также:  Java api java util list

If you didn’t find Java(TM) Platform plugin, use the below method to enable it.

[Check Java installed location] # update-alternatives --config java There are 3 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1072 auto mode 1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode 2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode * 3 /usr/lib/jvm/java-8-oracle/jre/bin/java 1072 manual mode Press to keep the current choice[*], or type selection number: [Create a directory called plugins if you do not have it] # mkdir -p /usr/lib/firefox-addons/plugins [Navigate to Plugins directory] # cd /usr/lib/firefox-addons/plugins [Create a symbolic link] # ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so

enable-java-applets-plugin-in-firefox-on-linux

Restart the Firefox browser and verify.

Method 2 : Enable Java plugin Support on Firefox through Oracle Java

1) Install OpenJDK

Simply fire the below commands to install openJDK & Java plugin support on firefox.

[Install openJRE] $ sudo apt-get install openjdk-8-jre [Install Java Plugin] $ sudo apt-get install icedtea-8-plugin

what-is-new-in-ubuntu-16-04-12a

Enjoy…)

Источник

9 Manual Installation and Registration of Java Plugin for Linux

Many browser vendors have removed NPAPI based plugin support. Therefore, the Java Plugin will not register with any modern browsers, such as Firefox ( Firefox 52+) and Chrome (Chrome 42+).

Manually linking the Java plugin libraries to the Mozilla plugins directory may cause the Firefox browser to crash on Linux during startup, due to incompatibilities with ‘glibc’ versions in JDK 8u191 and later releases. The crash might also occur if the link was manually created for an earlier JRE and a user updates to JDK 8u191 or later releases. For more information, see the Known Issues section of the JDK 8u191 release notes .

This page describes how to install and register the Java plugin.

This page has these topics:

Читайте также:  Функции javascript работы массивами

See «JDK 8 and JRE 8 Installation Start Here» for general information about installing JDK 8 and JRE 8.

Plugin Installation

When you install the Java platform, the Java plugin file is included as part of that install. If you want to use Java within Firefox, you need to manually create a symbolic link from the plugin file in the release to one of the locations that Firefox expects. To make the plugin available to all users, create the link inside of the Firefox application’s directory, in the plugins subdirectory. Alternatively, you can create the symbolic link in your home directory, in ~/.mozilla/plugins . In the remainder of this document, the text, «Firefox plugins directory«, implies either of these locations.

This release provides the Next-Generation Java plugin. If you have been using the classic plugin, see «Notes» for further information.

The location of the plugin file for Linux varies according to the processor architecture of the underlying platform, as shown in the following table.

Processor Architecture Location of File
32-bit j re1.8.0 version /lib/i386/libnpjp2.so
64-bit jre1.8.0_ version /lib/amd64/libnpjp2.so

If you are using a 32-bit Firefox, you should use the 32-bit Java Plugin (from the lib/i386 directory). To determine which version of Firefox you are running, launch the application, and select the menu item Help > About Mozilla Firefox. At the bottom of the window is a version string line that contains either «Linux i686» (32-bit) or «Linux x86_64» (64-bit).

To install the Java Plugin follow these steps:

  1. Exit Firefox.
  2. Uninstall any previous installations of Java Plugin. Only one Java Plugin can be used at a time. When you want to use a different plugin, or version of a plugin, remove the symbolic links to any other versions and create a fresh symbolic link to the new one. Remove the symbolic links (or move them to another directory) to javaplugin-oji.so and libnpjp2.so from the Firefox plugins directory.
  3. Create a symbolic link to the Java Plugin in the Firefox plugins directory. For a 32-bit plugin:
$ cd Firefox/plugins $ ln -s JRE/lib/i386/libnpjp2.so .
$ cd Firefox/plugins $ ln -s JRE/lib/amd64/libnpjp2.so .

Notes

The classic plugin file was located here:

JRE/plugin/i386/javaplugin-oji.so

This file should no longer be used and all symbolic links to it should be removed.

Источник

JavaPlugin

Эта инструкция описывает установку модуля поддержки Java от Oracle для Firefox.

Предыстория

Так как компания Oracle изменила лицензию на Java, запрещающую её распространение в дистрибутивах Linux, в браузерах Chromium и Firefox стало невозможно использовать старый плагин Java (из Java 1.6.0 Sun), а OpenJDK 1.7.0 может не поддерживать некоторые аплеты. Пользователю остаётся скачивать Java с сайта Oracle и настраивать её работу.

Правильный способ

1. Актуально для текущего стабильного бранча (p6) и Sisyphus. Обновить пакет mozilla-plugin-java-1.7.0-openjdk

2. Если аплеты не работают на OpenJDK, собрать OracleSDK как показано на http://www.altlinux.org/Java/OracleSDK и установить пакет mozilla-plugin-java-1.7.0-oracle

Чуть ниже инструкция для тех, кто не желает собирать пакет.

Получение Java с сайта Oracle

Нажмите «Accept License Agreement» и выберите нужный RPM для своей архитектуры:

Установка RPM

apt-get install jre-7u6-linux-i586.rpm
apt-get install jre-7u6-linux-x64.rpm

Регистрация в браузерах

Для всех пользователей

Если нужно сделать доступным для всех пользователей в Firefox и Chromium, выполните под правами root:

ln -s /usr/java/jre1.7.0_06/lib/i386/libnpjp2.so /usr/lib/browser-plugins
ln -s /usr/java/jre1.7.0_06/lib/amd64/libnpjp2.so /usr/lib64/browser-plugins

Для одного пользователя

В терминале под обычным пользователем выполните

mkdir ~/.mozilla/plugins/ ln -s /usr/java/jre1.7.0_06/lib/i386/libnpjp2.so ~/.mozilla/plugins/
mkdir ~/.mozilla/plugins/ ln -s /usr/java/jre1.7.0_06/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

Проверка работы

Проверка зарегистрированного плагина

Запустите Firefox и откройте адрес

В списке модулей должен быть плагин Java, как показано на рисунке.

Источник

Оцените статью