debian下裝jre

來源:互聯網
上載者:User
 剛裝了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.


  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 andConfigureFirefox 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檢測頁面開始出來檢測進度條了,不幸的是它最後沒能檢測出來,還是得手動去找..

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.