Error: Your JAVA_HOME is invalid: C: \ Program Files \ Java \ jdk1.8.0_73

4

I have an error trying to compile my apk using the command

ionic build android

The error I think was generated when java sent the update today and stayed as half installed, the error is this:

Error: Failed to run "java -version", make sure that you have a JDK installed.
You can get it from: http://www.oracle.com/technetwork/java/javase/downloads.
Your JAVA_HOME is invalid: C:\Program Files\Java\jdk1.8.0_73

It tells me to run the java -version command, to make sure if the jdk is installed, and it throws me the following error:

Error: could not open 'C:\Program Files\Java\jre1.8.0_91\lib\i386\jvm.cfg'

Install the latest java version, but apparently there was some installation error. I leave here a screenshot of the console

    
asked by Pedro Miguel Pimienta Morales 28.07.2016 в 05:27
source

3 answers

3

Regarding the error:

  

Error: Your JAVA_HOME is invalid: C: \ Program Files \ Java \ jdk1.8.0_73

This error can be related to the fact that the path is not specified correctly in the environment variables or you do not have the JDK installed.

But I am struck by the message that you get when executing from the command line java -version :

  

Error: could not open 'jvm.cfg'

This may be caused by not installing Java that does not correspond to your architecture, maybe you installed the 32-bit by mistake and you need 64-bit or vice versa.

I do not know if it is a drastic case that you have corrupted, as it is the case it would be a good idea to reinstall again.

    
answered by 28.07.2016 в 18:43
1

Try the following procedure * to uninstall Java manually, and then install it:

  • Remove the content of C:\Program Files\Java or C:\Program Files (x86)\Java (as the case may be).
  • Delete the contents of the %UserProfile%\LocalLow\Oracle\Java directory.
  • Delete the contents of the %UserProfile%\LocalLow\Sun\Java\ directory.
  • Delete path C:\ProgramData\Oracle\Java\javapath of variable PATH .
  • Run Microsoft Fix it utility .
  • Download and install Java SE Development Kit 8u102 .

    li>
  • Update or add variable JAVA_HOME to C:\Program Files\Java\jdk1.8.0_102 or C:\Program Files (x86)\Java\jdk1.8.0_102 (as the case may be).
  • ─────────────
    * Limitation of liability : In no case case the author of the response will be responsible for any claim, damages or other liabilities, whether in a litigation, tort or otherwise, arising from or in connection with this procedure or the use or other type of actions in the proceeding.

        
    answered by 28.07.2016 в 06:35
    0

    To be able to verify the JAVA_HOME we will follow the next steps in windows:

        
    answered by 08.08.2016 в 02:20