Facile alternanza tra diverse installazioni di Java

0

Attualmente ho Java 6 installato sul mio sistema (per favore non ridere) e ci stiamo spostando su Java 8 . Quindi abbiamo cambiato il ramo principale della nostra applicazione per utilizzare Java 8, tuttavia, abbiamo bisogno di supportare vecchie versioni che girano su Java 6. Quindi abbiamo bisogno di alternare facilmente.

Capisco che java (comando) punta a /usr/bin/java , che è un collegamento simbolico a /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java . Quella directory appare come segue:

/System/Library/Frameworks/JavaVM.framework/Versions@16:44:32>ls -la
total 64
drwxr-xr-x  11 root  wheel  374 Jun 16 16:39 .
drwxr-xr-x  12 root  wheel  408 Jun 16 16:43 ..
lrwxr-xr-x   1 root  wheel   10 Jun 16 16:39 1.4 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10 Jun 16 16:39 1.4.2 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10 Jun 16 16:39 1.5 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10 Jun 16 16:39 1.5.0 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10 Jun 16 16:39 1.6 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10 Jun 16 16:39 1.6.0 -> CurrentJDK
drwxr-xr-x   8 root  wheel  272 Jun 16 16:43 A
lrwxr-xr-x   1 root  wheel    1 Jun 16 16:39 Current -> A
lrwxr-xr-x   1 root  wheel   59 Jun 16 16:39 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents

Posso installare Java 8 senza disinstallare Java 6 e vorrei avere un meccanismo per rintracciare facilmente i comandi correlati in / usr / bin da /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents a /System/Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents .

Esiste un modo rapido ed esistente di farlo rispetto alla scrittura del mio script quando devo passare alle versioni / versioni legacy della nostra app per la risoluzione dei problemi e il supporto PROD? Come capovolgere l'alternativa java da 6 a 8 e fa tutto per te.

    
posta amphibient 26.06.2014 - 23:04
fonte

0 risposte

Leggi altre domande sui tag