Linux(Ubuntu)下给firefox安装jre插件

做法
     下载jre,并解压到某个文件夹!
     cd <firefox的安装目录>/plugins
     sudo ln -s <jre的安装目录>/lib/i386/libnpjp2.so      cd <mozilla>/plugins
     sudo ln -s <jre的安装目录>/lib/i386/libnpjp2.so
     重启 firefox 。     和你之前查的不同? 有疑问的请往下看!!
 
     今天打开一个含有 Applet 小程序的网页,发现少了传说中的 plugin,去查找发现是: java runtime environment (jre)。 于是点击安装插件,提示失败,要求手动安装,并给你个jre下载地址。
       好吧,我还不会手动安装呢!Google之。
       结论是再firefox安装目录里创建一个符号链接即可,那么:       cd <firefox的安装目录>/plugins
       sudo ln -s <jre的安装目录>/plugin/i386/ns7/libjavaplugin_oji.so       好吧,满怀希望地重启firefox,但是java的插件没有。
       是不是操作错了?于是 try again and again 。但是结果没变。
       但是,我发现再 firefox 的 about:plugins 的页面内展示的插件中有好多文件我再 <firefox>/plugins里没有见过。于是       cd /usr/lib
       ls -a | grep mozilla       发现再 mozilla里也有个 plugins的目录,接着按照上面的方法创建符号链接。
       重启,失败!!!
       纠结中…………
       怎么回事呢?上官网。上面写着 Java Runtime Environment Version: 1.4.2 or later  Supported  Supported  Java FAQ

  • Install Java Runtime Environment.
  • Make a symbolic link to libjavaplugin_oji.so in your Mozilla Plugins directory. Use the copy located in the plugin/i386/ns7 directory of JRE 5.0 or later, or plugin/i386/ns610-gcc32 if you are using JRE 1.4.2.
Do not copy the plugin to your plugins directory. If you do, Mozilla will crash any time you attempt to view a page containing a Java applet.
The instructions listed here are for the Sun Java Runtime Environment. Other Java Runtime Environments, such as those available from IBM and the Blackdown project, can also be used.
 
       既然官网都这么说了,可能是哪儿操作错了!于是又  try again and again, 于是在一次次的打击中我想……        但是希望来了。
       我偶然得知这么一个事实:Mozilla Firefox 3.6 系列将不再支持以前 OJI (Open Java Virtual Machine Integration)架构 Java 浏览器插件,需要使用 Java 6 Updates 10 及以后提供的符合 NPAPI 标准的新版本浏览器插件。我们创建的符号链接应该是一个叫做 libnpjp2.so的库,在jre/lib/i386里。而不是之前的libjavaplugin_oji.so。好吧,官网把我忽悠了!     最终解决方案:
     cd <firefox的安装目录>/plugins
     sudo ln -s <jre的安装目录>/lib/i386/libnpjp2.so
     为保险
     cd <mozilla>/plugins
     sudo ln -s <jre的安装目录>/lib/i386/libnpjp2.so
     重启 firefox 。成功了!
    
      可能有些同志不知道怎么操作:
      我的firefox安装目录是:/usr/lib/firefox (可以 whereis firefox),mozilla目录是:/usr/lib/mozilla,jre安装目录在:/opt/jre1.6.0_22
      操作过程:
      cd /usr/lib/firefox/plugins
      ln -s /opt/jre1.6.0_22/lib/i386/libnpjp2.so
      cd ..
      cd ..
      cd mozilla/plugins
      ln -s  /opt/jre1.6.0_22/lib/i386/libnpjp2.so      重启firefox!!!
      地址栏 about:plugins      图片为证:

http://www.huomo.cn/developer/article-15a76.html

http://www.oracle.com/technetwork/java/javase/manual-plugin-install-linux-136395.html

http://download.oracle.com/javase/6/docs/technotes/guides/jweb/applet/browser_support.html

http://jvarun.wordpress.com/2008/10/02/making-jre-work-in-firefox-suse-102-64-bit/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值