Sudo echo "deb-src trusty main" | tee -a /etc/apt//webupd8team-java.list Sudo echo "deb trusty main" | tee /etc/apt//webupd8team-java.list Sudo apt-get remove openjdk-6-jre default-jre default-jre-headless Sudo apt-get install oracle-java7-installer Open synaptic -> setting -> repositories -> tab Other Software Sudo apt-key adv –keyserver hkp://:80 –recv-keys EEA14886īefore you update, make sure you remove other repository, Sudo echo "deb-src precise main" | sudo tee -a /etc/apt/sources.list Sudo echo "deb precise main" | sudo tee -a /etc/apt/sources.list Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed fresh crunchbang, remove all ntfs partition … and i stuck at java installedįollow step there and stuck in depedency … at last found this work Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Update-alternatives: using /usr/lib/jvm/java-6-oracle/bin/javac to provide /usr/bin/javac (javac) in manual java -version * 0 /usr/lib/jvm/jdk1.8.0_152/bin/javac 2 auto modeġ /usr/lib/jvm/java-6-oracle/bin/javac 1 manual modeĢ /usr/lib/jvm/jdk1.8.0_152/bin/javac 2 manual mode There are 2 choices for the alternative javac (providing /usr/bin/javac). Update-alternatives: using /usr/lib/jvm/java-6-oracle/jre/bin/java to provide /usr/bin/java (java) in manual sudo update-alternatives -config javac Press enter to keep the current choice, or type selection number: 1 * 0 /usr/lib/jvm/jdk1.8.0_152/bin/java 2 auto modeġ /usr/lib/jvm/java-6-oracle/jre/bin/java 1 manual modeĢ /usr/lib/jvm/jdk1.8.0_152/bin/java 2 manual mode Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed sudo update-alternatives -config java Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)Īnd how to switch from jdk 8 to jdk 6, in jdk 8 i just need java and javac, so we switch that file version # switch java Java(TM) SE Runtime Environment (build 1.8.0_152-b16) Sudo update-alternatives -install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.*/bin/javac 2 Sudo update-alternatives -install /usr/bin/java java /usr/lib/jvm/jdk1.8.*/bin/java 2 Wget -no-check-certificate -no-cookies -header Cookie: oraclelicense=accept-securebackup-cookie there will be have 2 folder # download jdk 8 so switch is good ideaĪll my jdk located in /usr/lib/jvm. but i dont want remove oracle jdk 6, becouse some my software depend by that relic version. I have oracle jdk 6 and want using / switch to oracle jdk 8. $ kotlinc hello.kt -include-runtime -d hello.jar $ echo 'fun main(args: Array)' > hello.kt # test kotlin with runtime $ mkdir -p ~/worskpace/KOTLIN & cd ~/workspace/KOTLIN Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode) Java(TM) SE Runtime Environment (build 1.8.0_172-b11) $ sudo update-alternatives -set mozilla-javaplugin.so /opt/jdk1.8.0_172/jre/lib/amd64/libnpjp2.so $ sudo update-alternatives -set javac /opt/jdk1.8.0_172/bin/javac $ sudo update-alternatives -set java /opt/jdk1.8.0_172/bin/java $ sudo update-alternatives -install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.8.0_172/jre/lib/amd64/libnpjp2.so 1 $ sudo update-alternatives -install /usr/bin/javac javac /opt/jdk1.8.0_172/bin/javac 1 $ sudo update-alternatives -install /usr/bin/java java /opt/jdk1.8.0_172/bin/java 1 #deb jessie-backports sudo apt-get updateĭownload jdk oracle java from # install java sources.listĭeb jessie/updates main contrib non-freeĭeb jessie-updates main contrib non-free Reenable deb jessie/updates main contrib non-free in cat. OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode) Update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode Press enter to keep the current choice, or type selection number: 2 * 0 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 auto modeġ /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual modeĢ /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1069 manual mode There are 2 choices for the alternative java (providing /usr/bin/java). Sudo apt-get install -t jessie-backports openjdk-8-jdkĬhange default sudo update-alternatives -config java # deb-src jessie-updates main contrib non-free #deb jessie-updates main contrib non-free # jessie-updates, previously known as 'volatile' # deb-src jessie/updates main contrib non-free #deb jessie/updates main contrib non-free Deb jessie-backports mainĭisable deb jessie/updates main contrib non-free in cat /etc/apt/sources.list
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |