Failed to run JAVA even though path is set on Windows 8 Enterprise - Cordova

前端 未结 5 1334
死守一世寂寞
死守一世寂寞 2021-01-02 08:05

I have made a new Ionic / Cordova project and I\'m trying to build it on windows 8.1. I installed JDK and JRE 7 as well as android sdk and ant and added them to my path usin

相关标签:
5条回答
  • 2021-01-02 08:44

    There was a bad entry in the path that corrupted my whole system path.

    C:\Program Files\Microsoft SQL Server\110\Tools\Binn";C:\Program Files\Microsoft\Web Platform Installer\;

    Seems like that quotation mark is an entry added by SQL Server installation or web platform. I never added those to the path so it might be the installers fault?

    0 讨论(0)
  • 2021-01-02 08:47

    There is one thing you can try is to set this variable JAVA_HOME to C:\Program Files\Java\jdk1.7.0_51\bin

    Since you are using Windows, you can go to Control Panel to update it.

    You were able to run java -version probably because it's included in the User's path.

    0 讨论(0)
  • 2021-01-02 08:48

    After I ran into the same issue, the following steps seems to have fixed it:

    • PATH needs to contain the bin folder of the Java installation path C:\Program Files\Java\jdk1.8.0_05\bin make sure the bin is included
    • JAVA_HOME needs to be set to the root of that Java installation folder, in my case C:\Program Files\Java\jdk1.8.0_05
    0 讨论(0)
  • 2021-01-02 08:50

    In my case, i had multiple java instalations, and whenever i tried to print "echo %java_home%" command on command prompt, it always used to return "%java_home%" as it is.

    So i uninstalled all the java versions and then installed it again, and whoola, it worked.

    Hope this helps someone.

    0 讨论(0)
  • 2021-01-02 09:10

    In my case, It said "JAVA_HOME variable is unvalid, C:\Program Files\Java\jdk1.7.0_51". Then I added a quotation mark to JAVA_HOME. Just like "C:\Program Files\Java\jdk1.7.0_51". Finally It works. May This can be helpful

    0 讨论(0)
提交回复
热议问题