![]() |
|
Calendar
|
/doc/JDK e librerieJava on Linux - JDK e librerieVeniamo ora al motore di Java, o meglio ai due componenti fondamentali: compilatore e interprete. GCJ - http://gcc.gnu.org/java/E' un compilatore Java sviluppato su modello open source, ovvero a codice sorgente disponibile.
GIJL'interprete Java del gruppo GNU. Parte del progetto GCJ. GNU Classpath - http://www.gnu.org/software/classpath/Il compilatore GCJ si appoggia ad un altro progetto notevole. APPUNTISelezionare il JREPer selezionare il Java Runtime da usare al sistema operativo, aprite il terminale e digitate il seguente comando # sudo update-alternatives --config java digitate la password di root e There are 2 alternatives which provide `java'.
Selection Alternative
-----------------------------------------------
1 /usr/bin/gij-wrapper-4.0
*+ 2 /usr/lib/jvm/java-gcj/bin/java
Press enter to keep the default[*], or type selection number:
Se non dovesse comparire tra le opzioni dovete prima installarla. E' sufficiente attivare i repository universe e multiverse e cercare il pacchetto java con Synaptic. Installazione del package JDK di SunUna volta scaricato dal sito di Sun, procedere nel seguente modo: Installazione del file binario autoestraente 1. Diventa root
2. Copia il file *.bin nella directory in cui vuoi installare java:
cp ./j2re-1_4_0-linux-i586.bin /opt/
3. Spostati nella directory in cui hai copiato il file. Per esempio nella directory /opt (cd /opt)
4. Esegui j2re-1_4_0-linux-i586.bin usando i seguenti comandi:
chmod a+x j2re-1_4_0-linux-i586.bin e poi:
./j2re-1_4_0-linux-i586.bin
5. Lo script installerà Java RE in una cartella chiamata j2re1.4.0 nella directory corrente.
6. Puoi rinominare la cartella appena creata con:
mv ./j2re-1_4_0-linux-i586 ./java
Installazione del file RPM 1. Esegui j2re-1_4_0-linux-i586.bin usando i seguenti comandi:
chmod a+x j2re-1_4_0-linux-i586-rpm.bin e poi:
./j2re-1_4_0-linux-i586-rpm.bin
2. Lo script creerà un file chiamato: j2re-1_4_0_-linux-i586.rpm nella directory corrente.
3. Diventa root
4. Esegui il comando per installare i pacchetti rpm:
rpm -iv j2re-1_4_0-linux-i586.rpm oppure se si ha una Mandrake
urmpi j2re-1_4_0-linux-i586.rpm
5. Esci dalla shell di root.
Operazioni finali Il passo finale consiste nella definizione delle variabili d'ambiente, utili ma non necessarie, per il funzionamento di Java. Inoltre le variabili non dovrebbero essere definite se si utilizza il pacchetto *.rpm.bin, se però incontrate difficoltà fatelo. PATH=$PATH:/opt/java/bin Definizione del JRE di sun come defaultLa strada semplice... la strada contorta.... Ubuntu JDK SUN installazione da pacchetto binario1. aggiunta in elenco del repository "multiverse" sudo gedit etc/apt/sources.list aggiungere nel file: deb http://archive.ubuntu.com/ubuntu breezy main restricted universe multiverse 2. aggiornamento repository e installazione pacchetto "java-package" synaptic repository update synaptic install java-package 3. creazione del pacchetto (.deb) a partire dal pacchetto (.bin) nipe@ubuntu:~/Desktop/packs$ fakeroot make-jpkg j2sdk-1_4_2_10-linux-i586.bin risultato: Creating temporary directory:
Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk-doc.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk-doc.sh sun-j2sdk.sh
...warning...
Detected product:
Java(TM) Software Development Kit (J2SDK)
Standard Edition, Version 1.4.2+10
Sun Microsystems(TM), Inc.
Is this correct [Y/n]:
Checking free diskspace: done.
In the next step, the binary file will be extracted. Probably a
license agreement will be displayed. Please read this agreement
carefully. If you do not agree to the displayed license terms, the
package will not be built.
Press [Return] to continue:
--------------- ...lICENZA SUN... Do you agree to the above license terms? [yes or no] -------------- ...inflating...
Testing extracted archive... okay.
Create debian package:
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
sh: gcc: command not found
dpkg-architecture: warning: Couldn't determine gcc system type, falling back to default (native compilation)
sh: gcc: command not found
dpkg-architecture: warning: Couldn't determine gcc system type, falling back to default (native compilation)
dh_md5sums
dh_builddeb
dpkg-deb: building package `sun-j2sdk1.4' in `/tmp/make-jpkg.XXXXOa5XHe/sun-j2sdk1.4_1.4.2+10_i386.deb'.
copy sun-j2sdk1.4_1.4.2+10_i386.deb into directory /home/nipe/Desktop/packs/
The Debian package has been created in the current directory. You can
install the package as root (e.g. dpkg -i sun-j2sdk1.4_1.4.2+10_i386.deb).
Removing temporary directory: done
-------------- nipe@ubuntu:~/Desktop/packs$ ls risultato: j2sdk-1_4_2_10-linux-i586.bin sun-j2sdk1.4_1.4.2+10_i386.deb 4. installazione del pacchetto .deb nipe@ubuntu:~/Desktop/packs$ _usdo_ dpkg -i sun-j2sdk1.4_1.4.2+10_i386.deb risultato: Selecting previously deselected package sun-j2sdk1.4. (Reading database ... 62328 files and directories currently installed.) Unpacking sun-j2sdk1.4 (from sun-j2sdk1.4_1.4.2+10_i386.deb) ... Setting up sun-j2sdk1.4 (1.4.2+10) ... 5. scelta del nuovo java default di sistema nipe@ubuntu:~/Desktop/packs$ _usdo_ update-alternatives --config java risultato: There are 3 alternatives which provide `java'.
Selection Alternative
-----------------------------------------------
1 /usr/bin/gij-wrapper-4.0
*+ 2 /usr/lib/jvm/java-gcj/bin/java
3 /usr/lib/j2sdk1.4-sun/bin/java
Press enter to keep the default[*], or type selection number: 3
Using `/usr/lib/j2sdk1.4-sun/bin/java' to provide `java'.
FINE NoteCon GIJ 4.0 non funziona Eclipse 3.1 e neppure OpenOffice2.Base Link sorgentehttp://developer.classpath.org/mediation/ClasspathShowcase http://www.volalibero.it/installare_java.html http://ubuntuforums.org/showthread.php?t=76735 http://wiki.serios.net/wiki/Ubuntu_Java_JRE/JDK_installation http://wiki.ubuntu-it.org/InstallazioneJava http://incubator.apache.org/harmony/ ![]() This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. |