zoukankan      html  css  js  c++  java
  • debian下装jre

     刚装了debian,到nvidia网站给本本下驱动,GEFORCE系列可以自动检测GPU,真好。点击“开始检测GPU”,却让我装jre。主要分两步:


    1,为debian安装jre环境。

    2,为firefox的plugins目录添加软连接

    下面是官方文档(看sun在线文档的地址栏以orcale开头了,很是悲凉)的第一部分

    Follow these instructions:
    1. Change the permission of the file you downloaded to beexecutable. Type:
      chmod a+xjre-7u<version>-linux-i586.tar.gz
      where <version> is to be replaced bythe version downloaded.
      Example: For jre-7u3, the command is
      chmod a+x jre-7u3-linux-i586.tar.gz
    2. Verify that you have permission to execute the file.Type:
      ls -l
    1. Change to the directory in which you want toinstall. Type:
      cd <directory pathname>
      For example, to install the software in the /usr/java/ directory,Type:
      cd /usr/java/

      Note about root access: To install Java in a system-widelocation such as /usr/local, you must login as the root user togain the necessary permissions. If you do not have root access,install the Java in your home directory or a subdirectory for whichyou have write permissions。
    1. Unpack the tarball and install JavaType:
      % tar zxvfjre-7u<version>-linux-i586.tar.gz

      The license agreement is displayed. Review the agreement. Press thespacebar to display the next page. At the end, enteryes to proceed with the installation.
    2. Java is installed into its own directory. In this example, itis installed in the/usr/java/jre1.7.0_<version>directory. When the installation has completed, you will see theword Done.
    The installation completes

    1. Verify that thejre1.7.0_<version>sub-directory is listed under the current directory. Type:
      ls

    The installation is now complete. Skip to the Enableand Configure section.
      (奇怪的是解压的时候并没让我同意什么协议,
    一直解压完了。不知道有何隐患。)
     如果在debian的系统安装目录下安装,自然要su权限,我是在普通账户的家目录里安装的,所以第一步仅仅就是gz解压,随便甩给/home/wws/下面的一个目录(wws是普通账户名字)

     最开始没有发现还有第二部分文档,以为这样就好了,重启firefox,nvidia还是提醒安装jre环境。我试着给把jre安装路径写到环境变量里,修改~/.bashrc文件,加上诸如exportPATH=$PATH:/home/wws/software/jre/jre1.7.0_05等等(从网上搜),重新登录,在命令行里敲java,一大堆参数提示,证明生效了。

     但重启firefox,nividia页面还是不能“自动探测GPU”,这就需要第二部设置




    Enable andConfigure
    Firefox or Mozilla
    To configure the Java Plugin follow these steps:
    1. Exit Firefox browser if it is alreadyrunning.
    2. Uninstall any previous installations of JavaPlugin.
      Only one Java Plugin can be used at a time. When you want to use adifferent plugin, or version of a plugin, remove the symbolic linksto any other versions and create a fresh symbolic link to the newone.
    3. Create a symbolic link to the libnpjp2.sofile in the browser plugins directory
      • Go to the plugins sub-directory under the Firefox installationdirectory
        cd <Firefox installationdirectory>/plugins
      • Create the symbolic link
        ln -s <Java installationdirectory>/lib/i386/libnpjp2.so

      Note: If you are upgrading your Java version thenbefore creating new symbolic link you should remove old symboliclink to enable latest downloaded Java.

      To remove old symbolic link:
      type cd <Firefox installationdirectory>/plugins
      rm libjavaplugin_oji.so

      Example
      • If Firefox is installed at this directory:
        /usr/lib/<Firefox installationdirectory>
      • And if the Java is installed at this directory:
        /usr/java/<Java installationdirectory>
      • Then type in the terminal window to go to the browser plug-indirectory:
        /usr/lib/<Firefox installationdirectory>/plugin
      • Enter the following command to create a symbolic link to theJava Plug-in for the Mozilla browser.
        ln -s /usr/java/<Java installationdirectory>/lib/i386/libnpjp2.so


    4. Start the Firefox browser, or restart it if it isalready up.

      In Firefox, type about:plugins in the Location bar toconfirm that the Java Plugin is loaded. You can also click theTools menu to confirm that Java Console is there.

    很简单。我在/usr/lib/mozilla/plugins(flash之类的插件都放在这儿了)下面添加一个软链接,链接到libnpjp2.so这个文件。(它在jre安装目录的lib目录下)


    重启OK,nvidia的GPU检测页面开始出来检测进度条了,不幸的是它最后没能检测出来,还是得手动去找..


  • 相关阅读:
    Java中printf
    error C3688: invalid literal suffix '__FSTREXP'; literal operator or literal operator template 'operator ""__FSTREXP' not found
    C# IIS 访问网络映射磁盘 读取文件列表
    datatables 参数详解
    Telnet协议详解
    WCF中的ServiceHost初始化两种方式
    C# FTP 上传、下载、获取文件列表
    Oracle存储过程编译卡死的解决方法
    oracle 查询表结构
    Oracle大数据常见优化查询
  • 原文地址:https://www.cnblogs.com/weiweishuo/p/3082657.html
Copyright © 2011-2022 走看看