Linux下Firefox运行Java:SiteScope插件缺失问题求助(Oracle JRE)
Hey there! Let's work through this issue together. Since you've already got Oracle JRE installed, the problem almost certainly ties back to Firefox's restricted support for Java plugins (which use the NPAPI framework) in newer versions. Here's how to get things working:
1. Check Firefox's NPAPI Support Status
Starting with Firefox 52, the browser disables most NPAPI plugins by default (Java falls into this category). First, confirm your Firefox version:
- Type
about:supportinto the address bar and look for the "Version" field. If it's 52 or newer, we'll need to re-enable NPAPI.
2. Enable NPAPI in Firefox
Follow these steps to turn on NPAPI support:
- Open Firefox and type
about:configinto the address bar. Click "Accept the Risk and Continue" when prompted. - Use the search bar to find
plugin.load_flash_only— double-click it to set its value tofalse. - Next, search for
dom.ipc.plugins.enabled.java. If it exists, double-click to ensure it's set totrue. If it doesn't exist:- Right-click anywhere in the config list, hover over "New", then select "Boolean".
- Name the new preference
dom.ipc.plugins.enabled.javaand set its value totrue.
- Restart Firefox to apply these changes.
3. Verify the Java Plugin is Recognized
Now check if Firefox sees your Oracle JRE plugin:
- Type
about:addonsinto the address bar, then click "Plugins" in the left menu (older Firefox versions might useabout:pluginsinstead). - Look for an entry named "Oracle Java(TM) Plugin" or similar. If it shows up, you're halfway there!
- If you don't see it, we'll need to link the plugin file manually.
4. Manually Link the Java Plugin to Firefox
Oracle JRE includes the browser plugin file libnpjp2.so, but Firefox might not be picking it up automatically. Let's fix that:
- First, find your Oracle JRE installation path. Common locations are:
- System-wide install:
/usr/lib/jvm/java-[your-jre-version]-oracle - User-specific install:
$HOME/jre-[your-jre-version]
- System-wide install:
- Navigate to the plugin directory inside your JRE:
- For 64-bit systems:
[jre-path]/lib/amd64/ - For 32-bit systems:
[jre-path]/lib/i386/
- For 64-bit systems:
- Create a symbolic link to Firefox's plugin directory:
- For user-specific setup (no sudo needed):
ln -s /path/to/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/ - For system-wide setup (requires sudo):
sudo ln -s /path/to/jre/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/
- For user-specific setup (no sudo needed):
- Restart Firefox and check the plugins list again — the Java plugin should now appear.
5. Confirm SiteScope Compatibility
Finally, make sure your SiteScope version is compatible with both your installed Oracle JRE version and Firefox version. Some older SiteScope releases require specific Java versions (e.g., Java 8), so double-check the SiteScope documentation if you still run into issues.
内容的提问来源于stack exchange,提问作者user273695

