Domanda

Ecco il layout della directory che è stato installato con Leopard. Qual è la "A" directory e perché la " Current " oltre a " CurrentJDK " ;?

Sembra che tu possa facilmente cambiare il JDK corrente spostando il link CurrentJDK, ma i contenuti in Current e A saranno fuori sincrono.

lrwxr-xr-x  1 root  wheel    5 Jun 14 15:49 1.3 -> 1.3.1
drwxr-xr-x  3 root  wheel  102 Jan 14  2008 1.3.1
lrwxr-xr-x  1 root  wheel    5 Feb 21  2008 1.4 -> 1.4.2
lrwxr-xr-x  1 root  wheel    3 Jun 14 15:49 1.4.1 -> 1.4
drwxr-xr-x  8 root  wheel  272 Feb 21  2008 1.4.2
lrwxr-xr-x  1 root  wheel    5 Feb 21  2008 1.5 -> 1.5.0
drwxr-xr-x  8 root  wheel  272 Feb 21  2008 1.5.0
lrwxr-xr-x  1 root  wheel    5 Jun 14 15:49 1.6 -> 1.6.0
drwxr-xr-x  8 root  wheel  272 Jun 14 15:49 1.6.0
drwxr-xr-x  8 root  wheel  272 Jun 14 15:49 A
lrwxr-xr-x  1 root  wheel    1 Jun 14 15:49 Current -> A
lrwxr-xr-x  1 root  wheel    3 Jun 14 15:49 CurrentJDK -> 1.5
steve-mbp /System/Library/Frameworks/JavaVM.framework/Versions $ 

e i contenuti di A

-rw-r--r--   1 root  wheel    1925 Feb 29  2008 CodeResources
drwxr-xr-x  34 root  wheel    1156 Jun 14 15:49 Commands
drwxr-xr-x   3 root  wheel     102 Mar  6  2008 Frameworks
drwxr-xr-x  16 root  wheel     544 Jun 14 15:49 Headers
-rwxr-xr-x   1 root  wheel  236080 Feb 29  2008 JavaVM
drwxr-xr-x  29 root  wheel     986 Jun 14 15:49 Resources
steve-mbp /System/Library/Frameworks/JavaVM.framework/Versions/A $ 
È stato utile?

Soluzione

Il ( A , Current simbolicamente collegato a A ) fa parte della struttura di un framework Mac OS X, che JavaVM.framework è. Questo framework può contenere codice C o Objective-C, oltre alle installazioni JVM effettive. Quindi potrebbe potenzialmente essere collegato da un codice C o Objective-C oltre a contenere la JVM a fianco.

Nota che non dovresti cambiare il link CurrentJDK per puntare a qualsiasi cosa tranne che sia impostata da Mac OS X. A differenza di altre piattaforme, la macchina virtuale Java è un servizio del sistema operativo su Mac OS X e modificarlo in questo modo ti metterebbe in una configurazione non supportata (e potenzialmente non testata, instabile, ecc.).

Altri suggerimenti

Dovresti usare il comando Preferenze Java per cambiare la versione jvm.

Se hai i riflettori sul tuo disco rigido, puoi semplicemente mettere in evidenza " Preferenze Java "

Se vuoi tornare a una JVM precedente (qui, 1.5), puoi inserire quanto segue nel tuo ~ / .profile (o incollarlo in una finestra Terminale specifica):

export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/"
export PATH=$JAVA_HOME/bin/:$PATH
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top