New answers tagged jdk
I had the same problem. There has nothing to do on JAVA_HOME or configure-alternatives. The truth is there is no tools.jar in oracle-java-9(even in open-jdk). To use android-studio in the Ubuntu you must use java-8. Why? I don't know and I don't care! I must to learn Android Studio, so whatever... Install jdk-8 for android-studio, change PATH and JAVA_HOME ...
Move to the directory where you have downloaded the .sh file cd "path/to/downloaded-file" Take Read/Write/Execute permission by typing following command in terminal sudo chmod 777 downloaded-file.sh Run the file by ./downloaded-file.sh Done!
On Fedora I was able to fix that error with this command: sudo update-alternatives --config java There are 3 programs which provide 'java'. Selection Command ----------------------------------------------- *+ 1 /usr/lib/jvm/java-1.8.0-openjdk-18.104.22.168-1.b14.el7_2.x86_64/jre/bin/java 2 /usr/lib/jvm/java-1.7.0-openjdk-22.214.171.124-2....
yes , that's quite easy, just download the jdk, extract it somewhere and set path in your .bashrc file like below # User specific aliases and functions JAVA_HOME=/mnt/install/jdk1.8.0_77 JRE_HOME=/mnt/install/jdk1.8.0_77/bin export PATH=$JAVA_HOME/bin:$JRE_HOME:$MAVEN/bin:$PATH then close and open terminal again or do this source ~/.bashrc
Adding to the answer of Mitch (the accepted answer above), check your /usr/lib/jvm/ directory. Usually, java is installed there itself. You might have oracle java installed or you might have a latest version of java installed. Just checkout the directories at /usr/lib/jvm/ and add the one your java is in. For me, it was: /usr/lib/jvm/java-8-oracle So, ...
Top 50 recent answers are included