Ninawezaje kusanidi wamiliki wa Jua la J / / Oracle's Java JDK 6/7/8 au JRE?


Nenda kwa jibu lililokubaliwa


Ninataka kusanikisha Oracle's JRE na kusasisha kwa toleo la hivi majuzi na Sasisho la Programu wakati walipoachana. Je! Kuna kifurushi cha Ubuntu ambacho hutolewa na Canonical au Oracle?

Kabla ya kutolewa Java 7, nilifuata njia hii kusanikisha Java 6 .

Lakini haifanyi kazi kwa Java 7 . Hakuna kifurushi sun-java7-xxx . Unawezaje kufunga Java 7 ?


561





2011-08-07




Idadi ya majibu: 27


Kuna jibu kama hilo juu ya jinsi ya kufunga JRE 7.

Sasisha Java JDK

Njia ya mwongozo

  • Pakua Linux ya 32 au kidogo au 64-bit "iliyoshinishwa faili ya binary" - ina faili ya ".tar.gz".

  • Uncompress yake

    tar -xvf jdk-8-linux-i586.tar.gz (32-kidogo)

    tar -xvf jdk-8-linux-x64.tar.gz (64-bit)

    Kifurushi cha JDK 8 hutolewa kwenye ./jdk1.8.0 saraka. NB: Angalia kwa uangalifu jina la folda hii kwani Oracle inaonekana kubadilisha mara kwa mara na sasisho kila.

  • Sasa hoja saraka ya JDK 8 kwa /usr/lib

    sudo mkdir -p / usr / lib / jvm
    sudo mv ./jdk1.8.0 / usr / lib / jvm /
    
  • Sasa kukimbia

    sasisho mpya za sudo - mbadala "/ usr / bin / java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1
    sasisho mpya za sudo - mbadala "/ usr / bin / javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 1
    sasisho mpya za sudo - mbadala "/ usr / bin / maraya" "java" "/usr/lib/jvm/jdk1.8.0/bin/javaws" 1
    

    Hii itawapa Oracle JDK kipaumbele cha 1, ambayo inamaanisha kuwa kusanidi JDK zingine zitabadilisha kama chaguo msingi . Hakikisha kutumia kipaumbele cha juu ikiwa unataka Oracle JDK ibaki chaguo msingi.

  • Sahihisha umiliki wa faili na ruhusa za utekelezwaji:

    sudo chmod a + x / usr / bin / java
    sudo chmod a + x / usr / bin / joac
    sudo chmod a + x / usr / bin / java
    sudo chown -R mzizi: mizizi /usr/lib/jvm/jdk1.8.0
    

    NB: Kumbuka - Java JDK ina utekelezwaji zaidi ambao unaweza kufunga vile vile hapo juu. java , javac , javaws Pengine mara nyingi required. Jibu hili linaorodhesha majukumu mengine yanayopatikana.

  • Kimbia

    mbadala ya sudo-mbadala --config java
    

    Utaona matokeo kama hayo hapa chini - chagua nambari ya jdk1.8.0 - kwa mfano 3 katika orodha hii (isipokuwa haujawahi kusanikisha Java iliyowekwa kwenye tarakilishi yako ambapo kwa hivyo hukumu ambayo ikisema "Hakuna kitu cha kusanidi" itaonekana ):

     $ sudo 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-7-openjdk-amd64/jre/bin/java   1071      auto mode
      1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
    * 2            /usr/lib/jvm/jdk1.7.0/bin/java                   1         manual mode
      3            /usr/lib/jvm/jdk1.8.0/bin/java                   1         manual mode
    
    Press enter to keep the current choice[*], or type selection number: 3
    update-alternatives: using /usr/lib/jvm/jdk1.8.0/bin/java to provide /usr/bin/java (java) in manual mode
     

    Rudia yaliyo hapo juu kwa:

     sudo update-alternatives --config javac
    sudo update-alternatives --config javaws
     

Kumbuka kwa watumiaji wa NetBeans!

Unahitaji kuweka JDK mpya kama hariri ya kusanidi faili ya usanidi.


Ikiwa unataka kuwezesha programu-jalizi ya Mozilla Firefox:

 32 bit:
ln -s /usr/lib/jvm/jdk1.8.0/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/

64 bit:
ln -s /usr/lib/jvm/jdk1.8.0/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
 

NB: Unaweza kuunganisha programu-jalizi ( libnpjp2.so ) kwa /usr/lib/firefox/plugins/ usanidi wa mfumo mzima ( /usr/lib/firefox-addons/plugins kutoka 15.04 kuendelea). Kwa Ubuntu 13.10, njia ya saraka ya programu-jalizi ni /usr/lib/firefox/browser/plugins/ .

Kulingana na usanidi wako, unaweza kuhitaji kusasisha maelezo mafupi ya programu ya Firefox (au vivinjari vingine) katika /etc/apparmor.d/abstractions/ubuntu-browsers.d/java :

 # Replace the two lines:
#  /usr/lib/jvm/java-*-sun-1.*/jre/bin/java{,_vm} cx -> browser_java,
#  /usr/lib/jvm/java-*-sun-1.*/jre/lib/*/libnp*.so cx -> browser_java,
# with those (or adapt to your new jdk folder name)
/usr/lib/jvm/jdk*/jre/bin/java{,_vm} cx -> browser_java,
/usr/lib/jvm/jdk*/jre/lib/*/libnp*.so cx -> browser_java,
 

Kisha anza programu mpya:

 sudo /etc/init.d/apparmor restart
 

Njia rahisi (Imeshindwa)

Kumbuka: PPA ya timu ya WebUpd8 imekataliwa kwa ufanisi kutoka Aprili 16, 2019. Kwa hivyo PPA hii haina faili yoyote ya Java. Habari zaidi inaweza kupatikana kwenye ukurasa wa PPA kwenye Launchpad . Kwa hivyo njia hii haifanyi kazi tena na haipo kwa sababu ya sababu za ukaribishaji.

Njia rahisi ya kufunga JDK 7 ni kuifanya na WebOS Or Or Java Java OOS. Walakini, inaaminika kuwa PPA hii wakati mwingine ni ya zamani. Kumbuka pia hatari za kutumia PPA .

Hii inaweka JDK 7 (ambayo inajumuisha Java JDK, JRE na programu jalizi ya kivinjari cha Java):

 sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
# or if you want JDK 8:
# sudo apt-get install oracle-java8-installer
# these commands install Oracle JDK7/8 and set them as default VMs automatically:
# sudo apt-get install oracle-java7-set-default
# sudo apt-get install oracle-java8-set-default
 

Chanzo

NB: Kabla ya mtu kupiga mayowe hii ni dhidi ya leseni ya ugawanyaji wa Oracle - PPA haina Java katika kumbukumbu ya kibinafsi. Badala yake, PPA inapakua moja kwa moja kutoka kwa Oracle na kuiweka.

Njia ya Hati

Ikiwa uko kwenye usanikishaji mpya wa Ubuntu bila mitambo ya hapo awali ya Java, hati hii inarekebisha mchakato ulioorodheshwa hapo juu ikiwa hutaki aina yote hiyo kuwa koni. Kumbuka, bado unahitaji kupakua Java kutoka kwa wavuti ya Oracle - Viungo vya Oracle sio wget rafiki.

Kabla ya kutumia hii hakikisha kuwa hati hii iko kwenye saraka sawa na .tar.gz ugani wa faili uliyopakua na hakuna faili zinazoanza na jdk-7 kwenye folda hiyo hiyo. Ikiwa kuna, tafadhali ondoa kutoka kwa folda kwa muda. Kumbuka kufanya maandishi yatekelezwe ( chmod +x <script's file> ).

 #!/bin/sh

tar -xvf jdk-7*
sudo mkdir /usr/lib/jvm
sudo mv ./jdk1.7* /usr/lib/jvm/jdk1.7.0
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
sudo chmod a+x /usr/bin/java
sudo chmod a+x /usr/bin/javac
sudo chmod a+x /usr/bin/javaws
 

Ikiwa unataka kusanikisha programu-jalizi ya Firefox basi ongeza hii mwisho wa hati:

 mkdir ~/.mozilla/plugins
ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
sudo /etc/init.d/apparmor restart
 

Angalia ikiwa ufungaji umefaulu

Unaweza kuangalia ikiwa usakinishaji ulifanikiwa na amri ifuatayo:

 java -version
 

Unapaswa kuona kitu kama

 java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
 

Unaweza kuangalia ikiwa programu jalizi ya Jilla Mozilla imefanikiwa kwa kutumia tovuti rasmi ya uwanja .


Kwa Java 6: Je! Ninasakinishaje Oracle JDK 6?


888



Kuna jibu sawa juu ya jinsi ya kufunga JDK 8

Weka JER

Pakua Linux ya-32 au kidogo-64 "iliyoshinishwa faili ya binary" - ina faili ya ".tar.gz" na uifungue.

 tar -xvf jre-7-linux-i586.tar.gz
 

Kifurushi cha JRE 7 hutolewa kwenye saraka ya ./jre1.7.0. Sasa hoja saraka ya JRE 7 kwenda /usr/lib :

 sudo mv ./jre1.7.0* /usr/lib/jvm/jre1.7.0
 

Baadaye, endesha yafuatayo kupata orodha ya mbadala zilizosanikishwa sasa za Java.

 sudo update-alternatives --config java
 

Utapata mazao kama:

 There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
————————————————————
* 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode

Press enter to keep the current choice[*], or type selection number:
 

Kumbuka nambari ya mwisho na bonyeza waandishi wa habari ili kuhama huduma hii kwa mfano katika mfano huu kumbuka nambari 2 .

Ikiwa njia moja tu imeonyeshwa basi kumbuka nambari 0 .

 sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0/bin/java 3
 

Hii itaongeza usakinishaji wako mpya wa JRE 7 kwenye orodha mbadala yaani tumia nambari iliyokumbukwa + 1, ambayo ni, 3 katika mfano hapo juu. Sasa sanidi Java kutumia Oracle Java JRE:

 sudo update-alternatives --config java
 

Utaona matokeo kama hayo hapa chini - chagua nambari ya jre1.7.0, ambayo ni 3 :

 There are 3 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
————————————————————
* 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode
3 /usr/lib/jvm/jre1.7.0/jre/bin/java 3 manual mode

Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/lib/jvm/jre1.7.0/jre/bin/java to provide /usr/bin/java (java) in manual mode.
 

NB: Ikiwa hakukuwa na usanidi uliopita wa Java basi JRE mpya itakuwa mbadala na hautaona hapo juu.

Angalia toleo la wewe ufungaji mpya JER 7:

 java -version
 

Inapaswa kuzalisha

 java version “1.7.0”
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)
 

Sasisha programu-jalizi ya Firefox / Chrome

Katika terminal:

 mkdir ~/.mozilla/plugins
 

Ondoa programu-jalizi ya IcedTea, ikiwa imewekwa.

 sudo apt-get remove icedtea6-plugin
 

Ondoa toleo la zamani la programu-jalizi ya Java (inaweza au isiwepo):

 rm ~/.mozilla/plugins/libnpjp2.so
 

Sasa unaweza kusanikisha programu-jalizi, kwa kuunda kiunga cha mfano (unaambia Firefox, mahali ambapo programu-jalizi iko). Kwa matumizi ya Java-32

 ln -s /usr/lib/jvm/jre1.7.0/lib/i386/libnpjp2.so ~/.mozilla/plugins/
 

Kwa matumizi ya Java-bit kidogo ya Java

 ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
 

Thibitisha kuwa JRE imefanikiwa kwa kutumia tovuti rasmi ya ukumbi wa habari .


172


2011-08-07

Hapa kuna suluhisho lililojaribiwa na la kufanya kazi la kusanikisha Oracle JDK 7 na faili zake zote hivyo "javac" na kila kitu kingine kinafanya kazi: Jinsi ya kufunga Oracle Java 7 (JDK) Katika Ubuntu

Hapa kuna maagizo (kwa urahisi tu):

  1. Pakua Oracle JDK 7 mpya kutoka hapa .
  2. Futa matunzio ya Oracle Java JDK yaliyopakuliwa kwenye folda yako ya nyumbani - folda mpya inayoitwa "jdk1.7.0_03" (kwa sasisho la Java JDK7 3) inapaswa kuundwa. Ipe jina la "java-7-oracle" na uhamishe kwa / usr / lib / jvm ukitumia amri zifuatazo:
 cd
sudo mkdir -p /usr/lib/jvm/      #just in case
sudo mv java-7-oracle/ /usr/lib/jvm/
 

3. Sasisha Sasisha kifurushi cha Java iliyoundwa na Bruce Ingalls (vifurushi vinavyopatikana kwa Ubuntu 11.10, 11.04, 10.10 na 10.04):

 sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install update-java
 

4. Sasa kukimbia amri ifuatayo katika terminal ya kusakinisha Oracle Java JDK:

 sudo update-java
 


Chagua Toleo la Java ambalo unataka kusanikisha na kuweka kama chaguo-msingi

Baada ya dakika chache, Oracle Java JDK inapaswa kusanikishwa kwa mafanikio kwenye mashine yako ya Ubuntu. Unaweza kuangalia toleo hilo kwa kuendesha amri hizi kwenye terminal:

 java -version
javac -version
 

HABARI! Sehemu hii hapa chini ya jibu hili haifanyi kazi tena kwa sababu ya Java kubadilisha jinsi mienendo yao inatolewa. Imeachwa kama-ni kwa sababu za kihistoria.

Sasisha Oracle imetoa Java 8 (imara). Ili kuisanikisha, tumia amri zifuatazo:

 sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
 

Habari zaidi @ WebUpd8: Weka Oracle Java 8 Katika Jumba la Ubuntu Via PPA [JDK8]


100


2011-09-17

HABARI! Suluhisho hili haifanyi kazi tena kwa sababu ya kubadilisha Java jinsi mihemko yao inatolewa. Kama matokeo, jibu hili sio halali tena. Imeachwa kama-ni kwa sababu za kihistoria.

Kutoka http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html :

 sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-jdk7-installer
 

94


2012-01-29

Hivi ndivyo nilivyoisanikisha katika Oneiric sasa hivi. Itakuwa jibu la muda mrefu, lakini ilinifanyia kazi.

Pakua Java SDK ya hivi karibuni 1.7.0 kutoka Oracle. Kisha kuifuta kwa / usr / lib / jvm :

 cd /usr/lib/jvm/
sudo tar -xvzf ~/jdk-7-linux-x64.tar.gz
sudo mv jdk1.7.0 java-7-oracle
sudo ln -s java-7-oracle java-1.7.0-oracle
 

Baada ya hapo niliunda faili ya .java-1.7.0-oracle.jinfo katika / usr / lib / jvm na yaliyomo yafuatayo:

 alias=java-7-oracle
priority=100
section=non-free

jre ControlPanel /usr/lib/jvm/java-7-oracle/jre/bin/ControlPanel
jre java /usr/lib/jvm/java-7-oracle/jre/bin/java
jre java_vm /usr/lib/jvm/java-7-oracle/jre/bin/java_vm
jre javaws /usr/lib/jvm/java-7-oracle/jre/bin/javaws
jre jcontrol /usr/lib/jvm/java-7-oracle/jre/bin/jcontrol
jre keytool /usr/lib/jvm/java-7-oracle/jre/bin/keytool
jre pack200 /usr/lib/jvm/java-7-oracle/jre/bin/pack200
jre policytool /usr/lib/jvm/java-7-oracle/jre/bin/policytool
jre rmid /usr/lib/jvm/java-7-oracle/jre/bin/rmid
jre rmiregistry /usr/lib/jvm/java-7-oracle/jre/bin/rmiregistry
jre unpack200 /usr/lib/jvm/java-7-oracle/jre/bin/unpack200
jre orbd /usr/lib/jvm/java-7-oracle/jre/bin/orbd
jre servertool /usr/lib/jvm/java-7-oracle/jre/bin/servertool
jre tnameserv /usr/lib/jvm/java-7-oracle/jre/bin/tnameserv
jre jexec /usr/lib/jvm/java-7-oracle/jre/lib/jexec
jdk appletviewer /usr/lib/jvm/java-7-oracle/bin/appletviewer
jdk apt /usr/lib/jvm/java-7-oracle/bin/apt
jdk extcheck /usr/lib/jvm/java-7-oracle/bin/extcheck
jdk idlj /usr/lib/jvm/java-7-oracle/bin/idlj
jdk jar /usr/lib/jvm/java-7-oracle/bin/jar
jdk jarsigner /usr/lib/jvm/java-7-oracle/bin/jarsigner
jdk java-rmi.cgi /usr/lib/jvm/java-7-oracle/bin/java-rmi.cgi
jdk javac /usr/lib/jvm/java-7-oracle/bin/javac
jdk javadoc /usr/lib/jvm/java-7-oracle/bin/javadoc
jdk javah /usr/lib/jvm/java-7-oracle/bin/javah
jdk javap /usr/lib/jvm/java-7-oracle/bin/javap
jdk jconsole /usr/lib/jvm/java-7-oracle/bin/jconsole
jdk jdb /usr/lib/jvm/java-7-oracle/bin/jdb
jdk jhat /usr/lib/jvm/java-7-oracle/bin/jhat
jdk jinfo /usr/lib/jvm/java-7-oracle/bin/jinfo
jdk jmap /usr/lib/jvm/java-7-oracle/bin/jmap
jdk jps /usr/lib/jvm/java-7-oracle/bin/jps
jdk jrunscript /usr/lib/jvm/java-7-oracle/bin/jrunscript
jdk jsadebugd /usr/lib/jvm/java-7-oracle/bin/jsadebugd
jdk jstack /usr/lib/jvm/java-7-oracle/bin/jstack
jdk jstat /usr/lib/jvm/java-7-oracle/bin/jstat
jdk jstatd /usr/lib/jvm/java-7-oracle/bin/jstatd
jdk native2ascii /usr/lib/jvm/java-7-oracle/bin/native2ascii
jdk rmic /usr/lib/jvm/java-7-oracle/bin/rmic
jdk schemagen /usr/lib/jvm/java-7-oracle/bin/schemagen
jdk serialver /usr/lib/jvm/java-7-oracle/bin/serialver
jdk wsgen /usr/lib/jvm/java-7-oracle/bin/wsgen
jdk wsimport /usr/lib/jvm/java-7-oracle/bin/wsimport
jdk xjc /usr/lib/jvm/java-7-oracle/bin/xjc
plugin xulrunner-1.9-javaplugin.so /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so
plugin mozilla-javaplugin.so /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so
 

Basi unahitaji kusema mbadala za sasisho juu ya vitu vyote vipya:

 $ sudo -sH
Password:
# update-alternatives --quiet --install /usr/lib/xulrunner-addons/plugins/libjavaplugin.so xulrunner-1.9-javaplugin.so /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so 100
# update-alternatives --quiet --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so 100
# update-alternatives --quiet --install /usr/bin/appletviewer appletviewer /usr/lib/jvm/java-7-oracle/bin/appletviewer 100 --slave /usr/share/man/man1/appletviewer.1 appletviewer.1 /usr/lib/jvm/java-7-oracle/man/man1/appletviewer.1
# update-alternatives --quiet --install /usr/bin/apt apt /usr/lib/jvm/java-7-oracle/bin/apt 100 --slave /usr/share/man/man1/apt.1 apt.1 /usr/lib/jvm/java-7-oracle/man/man1/apt.1
# update-alternatives --quiet --install /usr/bin/extcheck extcheck /usr/lib/jvm/java-7-oracle/bin/extcheck 100 --slave /usr/share/man/man1/extcheck.1 extcheck.1 /usr/lib/jvm/java-7-oracle/man/man1/extcheck.1
# update-alternatives --quiet --install /usr/bin/idlj idlj /usr/lib/jvm/java-7-oracle/bin/idlj 100 --slave /usr/share/man/man1/idlj.1 idlj.1 /usr/lib/jvm/java-7-oracle/man/man1/idlj.1
# update-alternatives --quiet --install /usr/bin/jar jar /usr/lib/jvm/java-7-oracle/bin/jar 100 --slave /usr/share/man/man1/jar.1 jar.1 /usr/lib/jvm/java-7-oracle/man/man1/jar.1
# update-alternatives --quiet --install /usr/bin/jarsigner jarsigner /usr/lib/jvm/java-7-oracle/bin/jarsigner 100 --slave /usr/share/man/man1/jarsigner.1 jarsigner.1 /usr/lib/jvm/java-7-oracle/man/man1/jarsigner.1
# update-alternatives --quiet --install /usr/bin/javac javac /usr/lib/jvm/java-7-oracle/bin/javac 100 --slave /usr/share/man/man1/javac.1 javac.1 /usr/lib/jvm/java-7-oracle/man/man1/javac.1
# update-alternatives --quiet --install /usr/bin/javadoc javadoc /usr/lib/jvm/java-7-oracle/bin/javadoc 100 --slave /usr/share/man/man1/javadoc.1 javadoc.1 /usr/lib/jvm/java-7-oracle/man/man1/javadoc.1
# update-alternatives --quiet --install /usr/bin/javah javah /usr/lib/jvm/java-7-oracle/bin/javah 100 --slave /usr/share/man/man1/javah.1 javah.1 /usr/lib/jvm/java-7-oracle/man/man1/javah.1
# update-alternatives --quiet --install /usr/bin/javap javap /usr/lib/jvm/java-7-oracle/bin/javap 100 --slave /usr/share/man/man1/javap.1 javap.1 /usr/lib/jvm/java-7-oracle/man/man1/javap.1
# update-alternatives --quiet --install /usr/bin/jconsole jconsole /usr/lib/jvm/java-7-oracle/bin/jconsole 100 --slave /usr/share/man/man1/jconsole.1 jconsole.1 /usr/lib/jvm/java-7-oracle/man/man1/jconsole.1
# update-alternatives --quiet --install /usr/bin/jdb jdb /usr/lib/jvm/java-7-oracle/bin/jdb 100 --slave /usr/share/man/man1/jdb.1 jdb.1 /usr/lib/jvm/java-7-oracle/man/man1/jdb.1
# update-alternatives --quiet --install /usr/bin/jhat jhat /usr/lib/jvm/java-7-oracle/bin/jhat 100 --slave /usr/share/man/man1/jhat.1 jhat.1 /usr/lib/jvm/java-7-oracle/man/man1/jhat.1
# update-alternatives --quiet --install /usr/bin/jinfo jinfo /usr/lib/jvm/java-7-oracle/bin/jinfo 100 --slave /usr/share/man/man1/jinfo.1 jinfo.1 /usr/lib/jvm/java-7-oracle/man/man1/jinfo.1
# update-alternatives --quiet --install /usr/bin/jmap jmap /usr/lib/jvm/java-7-oracle/bin/jmap 100 --slave /usr/share/man/man1/jmap.1 jmap.1 /usr/lib/jvm/java-7-oracle/man/man1/jmap.1
# update-alternatives --quiet --install /usr/bin/jps jps /usr/lib/jvm/java-7-oracle/bin/jps 100 --slave /usr/share/man/man1/jps.1 jps.1 /usr/lib/jvm/java-7-oracle/man/man1/jps.1
# update-alternatives --quiet --install /usr/bin/jrunscript jrunscript /usr/lib/jvm/java-7-oracle/bin/jrunscript 100 --slave /usr/share/man/man1/jrunscript.1 jrunscript.1 /usr/lib/jvm/java-7-oracle/man/man1/jrunscript.1
# update-alternatives --quiet --install /usr/bin/jsadebugd jsadebugd /usr/lib/jvm/java-7-oracle/bin/jsadebugd 100 --slave /usr/share/man/man1/jsadebugd.1 jsadebugd.1 /usr/lib/jvm/java-7-oracle/man/man1/jsadebugd.1
# update-alternatives --quiet --install /usr/bin/jstack jstack /usr/lib/jvm/java-7-oracle/bin/jstack 100 --slave /usr/share/man/man1/jstack.1 jstack.1 /usr/lib/jvm/java-7-oracle/man/man1/jstack.1
# update-alternatives --quiet --install /usr/bin/jstat jstat /usr/lib/jvm/java-7-oracle/bin/jstat 100 --slave /usr/share/man/man1/jstat.1 jstat.1 /usr/lib/jvm/java-7-oracle/man/man1/jstat.1
# update-alternatives --quiet --install /usr/bin/jstatd jstatd /usr/lib/jvm/java-7-oracle/bin/jstatd 100 --slave /usr/share/man/man1/jstatd.1 jstatd.1 /usr/lib/jvm/java-7-oracle/man/man1/jstatd.1
# update-alternatives --quiet --install /usr/bin/native2ascii native2ascii /usr/lib/jvm/java-7-oracle/bin/native2ascii 100 --slave /usr/share/man/man1/native2ascii.1 native2ascii.1 /usr/lib/jvm/java-7-oracle/man/man1/native2ascii.1
# update-alternatives --quiet --install /usr/bin/rmic rmic /usr/lib/jvm/java-7-oracle/bin/rmic 100 --slave /usr/share/man/man1/rmic.1 rmic.1 /usr/lib/jvm/java-7-oracle/man/man1/rmic.1
# update-alternatives --quiet --install /usr/bin/schemagen schemagen /usr/lib/jvm/java-7-oracle/bin/schemagen 100 --slave /usr/share/man/man1/schemagen.1 schemagen.1 /usr/lib/jvm/java-7-oracle/man/man1/schemagen.1
# update-alternatives --quiet --install /usr/bin/serialver serialver /usr/lib/jvm/java-7-oracle/bin/serialver 100 --slave /usr/share/man/man1/serialver.1 serialver.1 /usr/lib/jvm/java-7-oracle/man/man1/serialver.1
# update-alternatives --quiet --install /usr/bin/wsgen wsgen /usr/lib/jvm/java-7-oracle/bin/wsgen 100 --slave /usr/share/man/man1/wsgen.1 wsgen.1 /usr/lib/jvm/java-7-oracle/man/man1/wsgen.1
# update-alternatives --quiet --install /usr/bin/wsimport wsimport /usr/lib/jvm/java-7-oracle/bin/wsimport 100 --slave /usr/share/man/man1/wsimport.1 wsimport.1 /usr/lib/jvm/java-7-oracle/man/man1/wsimport.1
# update-alternatives --quiet --install /usr/bin/xjc xjc /usr/lib/jvm/java-7-oracle/bin/xjc 100 --slave /usr/share/man/man1/xjc.1 xjc.1 /usr/lib/jvm/java-7-oracle/man/man1/xjc.1
# update-alternatives --quiet --install /usr/bin/java-rmi.cgi java-rmi.cgi /usr/lib/jvm/java-7-oracle/bin/java-rmi.cgi 100
# update-alternatives --quiet --install /usr/bin/ControlPanel ControlPanel /usr/lib/jvm/java-7-oracle/jre/bin/ControlPanel 100
# update-alternatives --quiet --install /usr/bin/java java /usr/lib/jvm/java-7-oracle/jre/bin/java 100
# update-alternatives --quiet --install /usr/bin/java_vm java_vm /usr/lib/jvm/java-7-oracle/jre/bin/java_vm 100
# update-alternatives --quiet --install /usr/bin/javaws javaws /usr/lib/jvm/java-7-oracle/jre/bin/javaws 100
# update-alternatives --quiet --install /usr/bin/jcontrol jcontrol /usr/lib/jvm/java-7-oracle/jre/bin/jcontrol 100
# update-alternatives --quiet --install /usr/bin/keytool keytool /usr/lib/jvm/java-7-oracle/jre/bin/keytool 100
# update-alternatives --quiet --install /usr/bin/pack200 pack200 /usr/lib/jvm/java-7-oracle/jre/bin/pack200 100
# update-alternatives --quiet --install /usr/bin/policytool policytool /usr/lib/jvm/java-7-oracle/jre/bin/policytool 100
# update-alternatives --quiet --install /usr/bin/rmid rmid /usr/lib/jvm/java-7-oracle/jre/bin/rmid 100
# update-alternatives --quiet --install /usr/bin/rmiregistry rmiregistry /usr/lib/jvm/java-7-oracle/jre/bin/rmiregistry 100
# update-alternatives --quiet --install /usr/bin/unpack200 unpack200 /usr/lib/jvm/java-7-oracle/jre/bin/unpack200 100
# update-alternatives --quiet --install /usr/bin/orbd orbd /usr/lib/jvm/java-7-oracle/jre/bin/orbd 100
# update-alternatives --quiet --install /usr/bin/servertool servertool /usr/lib/jvm/java-7-oracle/jre/bin/servertool 100
# update-alternatives --quiet --install /usr/bin/tnameserv tnameserv /usr/lib/jvm/java-7-oracle/jre/bin/tnameserv 100
# update-alternatives --quiet --install /usr/bin/jexec jexec /usr/lib/jvm/java-7-oracle/jre/lib/jexec 100
 

Sasa unaweza kutumia mbadala za sasisho kuchagua mpya SDK ya Java.

 # update-alternatives --config java              # Select java-1.7.0-oracle
# update-java-alternatives --set java-1.7.0-oracle
# exit
$
 

Hii ilinifanyia kazi, ikiwa kuna njia ya kifahari zaidi (bila kutumia watu wa tatu) ningefurahi kusikia juu ya jambo hilo. Bado ninahitaji kujaribu Firefox ikiwa naweza kuendesha Java ndani yake.


39


2011-10-17

Kumbuka: PPA ya timu ya WebUpd8 imekataliwa kwa ufanisi kutoka Aprili 16, 2019. Kwa hivyo PPA hii haina faili yoyote ya Java. Habari zaidi inaweza kupatikana kwenye ukurasa wa PPA kwenye Launchpad . Kwa hivyo njia hii haifanyi kazi tena na haipo kwa sababu ya kihistoria.

Jibu lililosasishwa:

Ninapendekeza kutumia moja ya wasakinishaji kutoka kwa pup ya webupd8team kwa njia hii:

  1. Ingiza amri hizi mbili kwenye Kituo cha kuongeza PPA hii na usasishe orodha yako ya vifurushi:

     sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
     
  2. Ingiza moja (au zaidi) ya maagizo haya kusanidi Java (wamiliki) unayohitaji:

     sudo apt-get install oracle-java6-installer
    sudo apt-get install oracle-java7-installer
    sudo apt-get install oracle-java8-installer
    sudo apt-get install oracle-java9-installer
     
  3. Wakati hati mpya ya usakinishaji ya Java imejaa na kisha kupakua na kusanikisha vifurushi vya Java wamiliki, unaweza pia kuingiza amri ifuatayo kuangalia matokeo ya usanidi:

     java -version
     

Unapaswa kupata pato la terminal (kwa toleo la java8) kama hii:

 java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)
 

Maelezo zaidi: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html

NB: Vifurushi hivi vinatoa Oracle Java JDK, ambayo inajumuisha Java JDK, JRE na programu jalizi ya kivinjari cha Java. Na Pup ya webupd8team / java ina wasakinishaji hawa tu, ambao huunganisha tu kwenye wavuti ya kupakua ya Oracle Java na kusanikisha JDK ya hivi karibuni.


25


2013-05-15

Kumbuka: PPA ya timu ya WebUpd8 imekataliwa kwa ufanisi kutoka Aprili 16, 2019. Kwa hivyo PPA hii haina faili yoyote ya Java. Habari zaidi inaweza kupatikana kwenye ukurasa wa PPA kwenye Launchpad . Kwa hivyo njia hii haifanyi kazi tena na haipo kwa sababu ya kihistoria.

Ninashukuru majibu yote yaliyopita. Nataka kuongeza jibu hili ili kurahisisha vitu ambavyo hufanywa na www.webupd8.org ili kusanikisha katika dakika 2-5 .

Ufungaji huu ni pamoja na:

 sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
 

Ni hayo tu!! Sasa angalia toleo la Java

 java -version
 

Matokeo yatakuwa kama

 java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) Server VM (build 23.25-b01, mixed mode
 

Kunaweza kuja toleo mpya, na kisha unaweza kuisasisha kwa amri hii:

 sudo update-java-alternatives -s java-7-oracle
 

Kuweka vigezo vya mazingira

 sudo apt-get install oracle-java7-set-default
 

Kwa zaidi, angalia Ingiza Oracle Java 7 kwa Ubuntu kupitia PPA ya PPA .


16


2013-09-02

Suluhisho hili litakupa vifurushi vilivyojengwa vilivyo safi kama vile walivyokuwa wakisafirisha na Ubuntu kabla Oracle haijazunguka.

Jibu

Kwanza jibu, kisha maelezo. Fungua terminal na unakili na ubandike yafuatayo, mstari kwa mstari.

 wget https://raw.githubusercontent.com/ladios/oab-java6/master/oab-java.sh -O oab-java.sh
chmod +x oab-java.sh
sudo ./oab-java.sh
 

Hii itaunda vifurushi rasmi vya jua-java6- * na kuifanya ipatikane katika kituo cha programu. Ikiwa pia unataka vifurushi vya oracle-java7- *, endesha hati kama hii:

 sudo ./oab-java.sh -7
 

Sasa unaweza kusanikisha vifurushi na msimamizi wa kifurushi unachopenda.

Maelezo

Wakati Oracle ilibadilisha leseni ya usambazaji kwa Java, usambazaji wa Linux haukuruhusiwa kusasisha tena vifurushi rasmi. Mtumiaji wa Github rraptorr alichukua hati ya Debian ambayo ilitumika kujenga vifurushi hadi wakati huo, na akaibadilisha ili ifanye kazi na upakuaji uliosasishwa kutoka Oracle. Sasa hutoa hati za kufunga za SUN Java6 na Oracle Java7 .

Hati ya oab.java.sh ni mpangilio tu ambao hupakua kiotomatiki toleo la sasa, huunda vifurushi na kuziongeza kwenye hazina ya kawaida.

Maelezo zaidi

Vifurushi vilivyoundwa na kusakinishwa kwa kutumia njia hii, hazitapokea sasisho kiotomatiki - tu wakati unasasisha hati. Unaweza kukwepa hii kwa kuunda cronjob inayoendesha hati hii kila mara. Njia savest ya kufanya hivyo ni kutumia anacron kwa kuweka hati katika /etc/cron.daily .

 wget https://raw.githubusercontent.com/ladios/oab-java6/master/oab-java.sh -O /root/oab-java.sh
chmod +x /root/oab-java.sh
ln -s /root/oab-java.sh /etc/cron.daily/oab-java
 

Sasa vifurushi zako rasmi za Java zitakuwa za kisasa kila wakati.


15


2012-08-09

Hii ilifanya kazi kwa mahitaji yangu ya ukuaji wa kuweza / kuandaa 1.6 au 1.7. Hapo awali nilikuwa naendesha 1.6 kutoka kwenye kifurushi cha Ubuntu.

  1. Pakua gzip 1.7 .
  2. Futa kwa folda
  3. Sasisha JAVA_HOME na PATH kwenye faili ya bash

     JAVA_HOME=/opt/java/jdk1.7.0_25
    export JAVA_HOME
    
    PATH=$JAVA_HOME/bin:$PATH
    export PATH
     

10


2013-08-30

Kwenye AMD64 unahitaji kurekebisha amri kidogo ili kuunda kiunga cha ishara:

 ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
 

badilisha tu i386 kwa amd64 .


9


2012-01-09

Ili kuifanya iweze kupatikana kwa watumiaji wote:

 sudo ln -s /usr/lib/jvm/jre1.7.0/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/
 

kwa x86_64:

 sudo ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/
 

7


2012-09-08

Pata JDK kutoka Oracle / Jua; pakua JDK ya Java kwa:

http://www.oracle.com/technetwork/java/javase/overview/index.html

Tafadhali pakua au uhamishe faili iliyopakuliwa kwenye saraka yako ya nyumbani ~ ,, kwa urahisi.

Kumbuka:

  • Usijali kuhusu JDK kupakua JEE.

  • Tafadhali ruka kuiga prompt "mtumiaji @ mwenyeji: ~ $".

  • Piga ingizo baada ya kila amri.

Kukimbia katika terminal ..

 [email protected]:~$ sudo mkdir -p /usr/lib/jvm/
[email protected]:~$ sudo mv jdk-7u4-linux-i586.tar.gz /usr/lib/jvm/
[email protected]:~$ cd /usr/lib/jvm/
[email protected]:~$ sudo tar zxvf jdk-7u4-linux-i586.tar.gz
 

Sasa wezesha Java (kwa kuendesha kibinafsi):

 [email protected]:~$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_04/bin/java" 1
[email protected]:~$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_04/bin/javac" 1
[email protected]:~$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0_04/bin/javaws" 1
 

Funga vivinjari vyote.

Unda folda za programu-jalizi za Mozilla kwenye saraka yako ya nyumbani:

 [email protected]:~$ mkdir ~/.mozilla/plugins/
 

Unda kiunga cha mfano kwenye folda yako ya programu-jalizi ya Mozilla. Kwa mifumo-kidogo-64, Badilisha 'i386' na 'amd64':

 [email protected]:~$ ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/
 

Kujaribu:

 [email protected]:~$ java -version
 

Matokeo:

 java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) Server VM (build 23.0-b21, mixed mode)
 

Kujaribu:

 [email protected]:~$ javac -version
 

Matokeo:

 javac 1.7.0_04
 

Thibitisha JRE kwa http://java.com/en/download/installed.jsp .


7


2012-04-29

Ninapendekeza njia moja ya kufanya iwe rahisi kusanidi kwa Oracle's Java 7.

Kwa kuwa Ubuntu haitoi vifurushi vya Oracle's Java 7, mimi hutoa mkusanyiko wa vifurushi vya Ubuntu kwenye hazina yangu mwenyewe ya kifurushi.

Vifurushi vimeunganishwa kikamilifu katika njia ya Ubuntu ya kusaidia Java. Utaweza kuchagua mbadala ya Oracle's Java 7 na vifaa vya kawaida: sasisha mbadala au sasisha-java mbadala.

Ukurasa kuu wa mchango wangu ni: http://www.arakhne.org/jdk/index.html

Kupata vifurushi, unahitaji kuongeza tu hazina yangu ya kifurushi katika usanidi wa mfumo wako. Mchakato huo umeelezewa katika http://www.arakhne.org/ubuntu.html

Stéphane.


5


2012-05-09

Njia rahisi ni kupakua java 7 na Netbeans hapa - http://www.oracle.com/technetwork/java/javase/downloads/jdk-7-netbeans-download-432126.html


4


2013-01-09

Kumbuka: PPA ya timu ya WebUpd8 imekataliwa kwa ufanisi kutoka Aprili 16, 2019. Kwa hivyo PPA hii haina faili yoyote ya Java. Habari zaidi inaweza kupatikana kwenye ukurasa wa PPA kwenye Launchpad . Kwa hivyo njia hii haifanyi kazi tena na haipo kwa sababu ya kihistoria.

Kwa wale ambao wanaishi Syria, Cuba, Libya, Korea au nchi yoyote ambayo Oracle inazuia huduma zake, hii ni njia ya kufanya kazi ya kufunga Oracle JDK 8.

  1. Kutumia KIUME, nenda kwenye kiunga hiki na ukubali masharti kisha upakue tar.gz inayofaa kwa mfumo wako (32 au 64 kidogo).
  2. Sogeza tarball hiyo kwenye saraka ya kupakua kwenye folda yako ya nyumbani.
  3. endesha hati hii kama sudo:


 if [[ $UID != 0 ]]; then
  echo "This script neeeds to be run with sudo, like this:"
  echo -e "\n  sudo $0 $*\n"
  exit 1
fi
apt-get install python-software-properties
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer
if [ ! -f $HOME/Downloads/jdk-8u5-linux-*.tar.gz ]; then
  echo "The JDK tar.gz file was not found in $HOME/Downloads. please download it, put it in $HOME/Downloads and run again."
  exit 1
fi
cp ~/Downloads/jdk-8u5-linux-*.tar.gz /var/cache/oracle-jdk8-installer/
apt-get install oracle-java8-installer
apt-get install oracle-java8-set-default
java -version
 

4


2014-07-04

Kwangu mimi ni tofauti kidogo. Kwa Ubuntu 12.04 LTS Precise (Desktop):

  1. Pakua jre-*.tar.gz

  2. tar -zxvf jre-*.tar.gz

  3. mkdir /usr/lib/jvm/

  4. mv jre* /usr/lib/jvm/

  5. ln -s /usr/lib/jvm/jre*/bin/java /usr/bin/

Ni hayo tu.

Ili kuhakikisha kuwa ni sahihi:

 java -version
 

Ikiwa unataka kuongeza kuziba kwa Firefox au Chrome:

  1. mkdir ~/.mozilla/plugins

  2. ln -s /usr/lib/jvm/jre*/lib/i386/libnpjp2.so ~/.mozilla/plugins/

Ujumbe maalum: Ikiwa unayo usakinishaji mpya wa 64, unaweza kupata kosa zifuatazo wakati unaendesha java -version

 -bash: ./java: No such file or directory
 

Hii inasababishwa na utegemezi kwenye libc6-i386 kifurushi ambacho hakijajumuishwa na chaguo-msingi katika Desktop Ubuntu Desktop 12.04. Ili kusanikisha kifurushi hiki, endesha: sudo apt-get install libc6-i386


3


2012-06-05

Hapa kuna maandishi ya bash ambayo yanaweza kusaidia katika kuunda mbadala wa java:

 #!/bin/bash

BIN_HOME="/usr/bin"
JVM_BIN_HOME="/usr/lib/jvm/jdk1.7.0_21/bin"

UPDATE_CMD="update-alternatives"
UPDATE_OPT="--install"
UPDATE_DEFAULT_PRIORITY=10

echo "Installing alternatives for Oracle JDK."
#echo "JAVA_BIN_HOME=$JAVA_BIN_HOME"
#echo "BIN_HOM=$BIN_HOME"
echo "All cmds in \"$JVM_BIN_HOME\" will be installed in \"$BIN_HOME\" with \"$UPDATE_CMD\""
echo

# 
# Calls update-alternatives.
# Param 1 is the java cmd name and optionally param 2 is the priority
# See 'man update-alternatives' for more information.
# 
function update_alt() {
    if [ -z "$2" -o "${2}xxx" = "xxx" ]; then
    echo "using default priority: $UPDATE_DEFAULT_PRIORITY"
    PRIORITY=$UPDATE_DEFAULT_PRIORITY
    else
    PRIORITY=$2
    fi

    EXEC="$UPDATE_CMD $UPDATE_OPT $BIN_HOME/$1 $1 $JVM_BIN_HOME/$1 $PRIORITY"
    echo $EXEC
    $EXEC
    return 0
}

for bin in $JVM_BIN_HOME/*
do
    if [ -x $bin ]; then
    cmd=$(basename $bin)

    if [ -x $BIN_HOME/$cmd ]; then
        echo "notice: alternative already installed, \"$cmd\""
        continue # Skip installation of alternative.
    fi

    echo "install alternative: $cmd"
    update_alt $cmd
    if [ ! -x $BIN_HOME/$cmd ]; then
        echo "error: failed to install alternative, \"$cmd\""
        exit 1
    fi
    fi
done

exit 0
 

3


2013-05-08

Suluhisho moja kwa moja

Badala ya kupakua .tar.gz kifurushi napendekeza upakue .rpm kifurushi hicho. Kisha kukimbia:

 sudo apt-get install alien dpkg-dev debhelper build-essential
sudo alien --scripts jdk-7u-linux-.rpm 
 

ambapo naamini ya sasa <build> ni 21 na <version> inategemea usanifu wa mfumo wako.

Kwanza kufunga mgeni, maombi kwa ajili ya kubadili .rpm kwa .deb . Amri ya pili kisha inaendesha mgeni kwenye kifurushi cha jdk. Hii inapaswa kutumika kwa dakika moja au mbili na kutoa faili iliyoandikiwa:

jdk-7u<build>-linux-<version>.deb

Kifurushi hiki kinaweza kusanikishwa kwa kuendesha:

 sudo dpkg -i jdk-7u<build>-linux-<version>.deb
 

Hivi ndivyo nilivyoisanikisha kwa mafanikio kwenye mashine yangu.


3


2013-05-09

Nadhani njia bora tayari imeshatumwa lakini nilikuwa na shida na hii: ambayo ninaondoa java 'manually' update-alternatives kisha nimejaribu kufanya hivi

update-alternatives --install "/usr/bin/java/" "java" "/usr/lib/jvm/jre1.7.0_05/bin/java" 1

lakini niliendelea kupata kosa hili

sasisho mbadala: kutumia /usr/lib/jvm/jre1.7.0_05/bin/java kutoa / usr / bin / java / (java) katika hali ya kiotomatiki. sasisho mbadala: kosa: kukosa kufanya /usr/bin/java/.dpkg-tmp ulinganifu kwa / nk / njia mbadala / java: Hakuna faili kama hiyo au saraka

Lakini kwa bahati nzuri nimekutana na mafunzo mazuri kwenye wavuti hii: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html na ilifanya kazi vizuri tu :)


3


2012-07-11

Kwa kusanikisha la 32-bit la Java juu ya Ubuntu wa 64-bit:

Fungua windows terminal ( Ctrl+ Alt+ Tndio njia ya haraka ikiwa haujui) na andika kwa yafuatayo kufunga:

 sudo add-apt-repository "deb http://download.tuxfamily.org/arakhne/ubuntu precise-arakhne universe"

wget http://download.tuxfamily.org//arakhne/public.key -O - | sudo apt-key add -
apt-get install ia32-oracle-java7-jre
 

3


2012-09-11

Njia bora ambayo ninaweza kutoa ikiwa unataka kusanikisha Java 6 chini ya Ubuntu 12.04 LTS (Precise Pangolin) ni:

 sudo apt-get purge sun-java
 

Unahitaji kufanya hivyo ikiwa unataka programu-jalizi ya Mozilla kufanya kazi bila mgongano na Java 7 kwa mfano.

 mkdir ~/src

cd ~/src
git clone https://github.com/flexiondotorg/oab-java6.git
cd ~/src/oab-java6
sudo ./oab-java.sh
 

Basi itakapomalizika, sasisha Java:

 sudo apt-get install sun-java6-plugin sun-java6-jre sun-java6-bin sun-java6-jdk
 

Unaweza kufuata mchakato wa usanidi na:

 tail -f ~/src/oab-java6/oab-java.sh.log
 

Maelezo : sawa na katika jibu la Je! Ninawezaje kufunga usimamiaji wa Jua la J / / Oracle's Java JDK 6/7/8 au JRE? .

Ref : Kufunga Java6 JDK kwenye Ubuntu 12.04


2


2014-01-03

Kwangu njia ya Debian (sic) ingekuwa kuunda kifurushi chako mwenyewe.

Unasanikisha java-package

 sudo apt-get install java-package
 

Unapakua kumbukumbu ya Oracle tar.gz.

Unaunda kifurushi chako cha deni

 fakeroot make-jpkg jdk-7u79-linux-x64.tar.gz
 

Kuiweka

 sudo dpkg -i oracle-java7-jdk_7u79_amd64.deb
 

2


2015-12-13

Pakua .tar.gz toleo la taka la JDK kwa mfumo wako wa Ubuntu kutoka http://oracle.com , kwa mfano jdk-8u102-linux-x64.tar.gz .

Bonyeza kwa mahali popote unapotaka kwenye /home saraka, kwa mfano /home/dante/Programs/Java . Sasa tunayo folda iliyo na jina kama jdk1.8.0_102 ndani /home/dante/Programs/Java .

Ongeza mistari hii miwili kwenye /home/dante/.profile faili yako

 export JAVA_HOME=/home/dante/Programs/Java/jdk1.8.0_102
export PATH=$JAVA_HOME/bin:$PATH
 

Anzisha tena mfumo wako na baada ya kuanza upya unapaswa kuona toleo lako la Java kwa kufanya kazi java -version kwenye terminal.


2


2016-08-26

Sijui ni kwanini watu wametoa majibu makubwa sana lakini kuongeza jdk / bin kwenye PATH hufanya kazi vizuri tu: -

Ongeza yako jdk/bin kwa PATH kama ilivyoambiwa hapa katika kesi yangu hii ndio maoni yangu /etc/environment : -

    $ cat /etc/environment     
   PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/jdk-9.0.1/bin"    
   JAVA_HOME="/opt/jdk-9.0.1/"
 

2


2017-12-22

Kufunga Sun Java 6 kwenye Usahihi kupitia Uaminifu, unaweza kutumia vifurushi vya Hifadhi ya Msingi iliyohifadhiwa / Mpango wa Partner .

 sudo add-apt-repository ppa:maxb/preserved
sudo apt-get update
sudo apt-get install sun-java6-jre
sudo update-alternatives --config java
 

Na kisha chagua toleo la Java inayotaka. Unaweza kuangalia ni nini unaendelea na:

 [email protected]:/tmp$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
 

1


2014-06-05

Kufunga Oracle Java (JDK / JRE):

Unaweza kuaboresha kazi ya kusanidi / kusanifisha Oracle Java (JDK / JRE) kutoka kwa chanzo cha kupakuliwa (tar.gz) na hati hii: oraji .

Hatua:

  1. Download tar.gz chanzo cha taka JDK / JRE version yako.
  2. kukimbia sudo oraji /path/to/the/jdk_or_jre/archive

Ondoa:

kukimbia sudo oraji -u na uthibitishe toleo la jdk / jre kuwa haijatolewa.


1


2015-12-23

OS: Ubuntu 18.04 LTS

Nashangaa hakuna mtu aliyetaja conda . Kiunga:
https://docs.conda.io/en/latest/miniconda.html

Niliweka java katika moja wapo ya mazingira yangu ya kondoni na kutumia java amri bila shida.


0


2019-08-25