Hagai L
Hagai L

Reputation: 1613

Xamarin: changing JDK location in visual studio 2013

It seems like you can't change the JDK location via Visual Studio.
Currently It's using 1.6 which gives the warning:

major version 51 is newer than 50, the highest major version supported by this compiler

Does anyone know how to do it?

Upvotes: 3

Views: 2180

Answers (3)

user7338313
user7338313

Reputation: 16

You need to adjust where the Visual Studio setting for where Xamarin is looking for Java, rather than Visual Studio setting for where Java is. This answer explains how to do this: Changing path to SDK located in different location in Visual studio

Upvotes: 0

Dvir
Dvir

Reputation: 3139

Version 51 means Java 7 and version 50 means Java 6.

You can do one of the following:

1)

Source: http://www.veryant.com/support/phpkb/question.php?ID=192

This happens when there is a tools.jar file from JDK 6 in CLASSPATH before the one from JDK 7. For example, if you installed isCOBOL with JDK 6 and then installed it with JDK 7, your user CLASSPATH setting might be as follows:

C:Program Files (x86)VeryantisCOBOL2012R1lib*; C:Program Files (x86)Javajdk1.6.0_26libtools.jar; C:Program Files (x86)Javajdk1.7.0_03libtools.jar

To fix this problem:

Launch the control panel Edit the system environment variables (e.g. In Windows 7 search for "environment variables" or go to "System and Security > System > Advanced system settings" and click on Environment Variables) Double-click on CLASSPATH and delete the path to the JDK 6 version of tools.jar in both "User variables" and "System variables"

Or:

2)

Source: http://forums.xamarin.com/discussion/20816/error-building-project-with-google-play-services

Skip the add google maps.

I can confirm this worked for me.

  1. Add Google Maps

  2. Update to Java 7 from Oracle's site

  3. Add the 1G heap

  4. under properties Clean solution

  5. Restart VS2013

3)

Disable or uninstall Java 6

I hope it address your issue.

If you would like more details per each one of the cases , let me know and I'll update the answer.

Upvotes: 1

Catalina
Catalina

Reputation: 2108

Try uninstalling your Java version from Control Panel> Programs and Features and then install jdk 1.7

Upvotes: 0

Related Questions