简体   繁体   中英

The specified task executable location “C:\Program Files (x86)\Java\jdk1.7.0_71\\bin\javac.exe” is invalid

Ok im wondering where does xamarin get this path from?

Severity Code Description Project File Line Source Suppression State Error The specified task executable location "C:\\Program Files (x86)\\Java\\jdk1.7.0_71\\\\bin\\javac.exe" is invalid.

So I can go and change it to the new jdk1.8. I have the new JDK set up I just need to know where to change the path at.

I had the same problem and solution is.

  1. Remove all jdk and install jdk 1.8
  2. Change reference java location in Visual Studio Tool > Options > Xamarin
  3. Clean and Rebuild Project

I've just solved this exact problem for me. I don't know why you wouldn't have a JDK_HOME variable. Completely remove the JDK and install it again maybe? The Environment Variables for java were set to my previously installed path. I guess Oracle screwed up here.

As I had the same error, here's what I did:

I went to C:\\Program Files\\Java\\ and checked what the jdk folder is called. For me it's jdk1.8.0_102 .

For users who don't know where to find System Variables : Go to System Properties and on the left hand side, click Advanced System Settings . Switch to the Advanced tab, click Environment Variables . Under System Variables there should be two variables in the list called JAVA_HOME and JDK_HOME .

I edited those values and change the path to what I found in the java folder. In my case this would be C:\\Program Files\\Java\\jdk1.8.0_102 .

No need to close VS, just build your app and it should get passed the annoying error.

Hope this helps :)

I had exactly the same problem. I got it to go away (which is not the same thing as fixing it).

  • Un-install every bit of JAVA you have. Delete both JAVA folders (Program Files and Program Files (x86)).
  • Install the latest version of the Java (x32) SDK.
  • Clean and Rebuild your project(s).
  • Since my Solution is multi-platform, I changed the Startup Project to the .iOS one, built it, ran it in an emulator, and set the Startup Project back to the .Droid project.

Somewhere in all this, the problem went away. And remember kids! If it can go away all by itself, it can come back again all by itself!

I had this issue as well, I downloaded 32 bit Java but VS was still looking for the 64 bit one.

To solve it all I had to do was change the JAVA_HOME and the variable in my Path, clean my project and rebuild it.

Just set JAVA_HOME and JDK_HOME ambient variables, clean your solution and build again. For me worked fine. Don't forget to clean your solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM