New answers tagged

0

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 ...


0

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!


0

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-1.8.0.91-1.b14.el7_2.x86_64/jre/bin/java 2 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.101-2....


1

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


0

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