Copy the path, right before the /bin/java portion and add it among your environment variables by pasting it right at the end of the /etc/environment file. Your installation path will most likely be /usr/lib/jvm/java-8-openjdk-amd64/bin/java. You can determine that by running: sudo update-alternatives -config java You'd have to determine where Java is installed to be able to do this. Third, set the JAVA_HOME Environment Variable. To verify that both are installed, run java -version for JRE and javac -version for JDK Second, Install the Java Development Kit (JDK) version 8 sudo apt-get update So after dealing with this and all subsequent errors, I thought I should elaborate the solution that completely worked for me:įirst, Install the Default Java runtime environment (JRE) sudo apt update Since this is an Ionic project, you'd face other problems if you don't specifically install Open JDK 8 and properly set your environment variables - Cordova currently supports only Open JDK8, and going with a newer version might generate the warning message: Requirements check failed for JDK 8 ('1.8.*')! Detected version: 11.0.9 I realized this doesn't have to just end with eliminating the error by installing the Java Development Kit. Result : The program 'javac' can be found in the following packages: OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode) I have already installed java, cordova and android studio on my PC(ubuntu 16.04) following are some details : Re-running this command with the -verbose flag may provide more information. Apache Tomcat 3.3 is the latest continuation of the Apache Tomcat 3.x architecture it is more advanced then 3.2.4, which is the 'old' production quality release. Version 3.3 is the current production quality release for the Servlet 2.2 and JSP 1.1 specifications. Unfortunately, many applications still run on old versions of Java, such as the previous LTS versions: Java 11 and Java 8. Apache Tomcat 3.x is available for download from the archives. An error occurred while running subprocess cordova.Ĭordova build android -device exited with exit code 1. Java 17, the next Long-Term-Support (LTS) version of the Java language and runtime platform, will be officially released on September 14. Your JAVA_HOME is invalid: /usr/lib/jvm/java-8-openjdk-amd64 You can get it from the following location: I am working with ionic 5 and when I am running ionic cordova run android then after a while I have got the following error : Failed to run "javac -version", make sure that you have a JDK version 8 installed. I am new to ionic and I have tried everything available on the internet regarding this issue but i haven`t found any suitable/matching solution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |