Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 489
SEng Avatar asked Jul 13 '16 16:07

SEng


2 Answers

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
like image 107
Abelini Avatar answered Nov 18 '22 09:11

Abelini


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 :)

like image 22
DerpyNerd Avatar answered Nov 18 '22 11:11

DerpyNerd