-2

I am trying create a simple game in cocos2d-x, but when I compile my project I get the following error.

BUILD FAILED D:\Android\sdk\tools\ant\build.xml:597: The following error occurred while executing this line: D:\Android\sdk\tools\ant\build.xml:716: The following error occurred while executing this line: D:\Android\sdk\tools\ant\build.xml:730: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "D:\JAVA"

Total time: 2 seconds Error running command, return code: 1. D:\cocos2d-x\GAME>

Community
  • 1
  • 1

1 Answers1

1

You should post more details, but a first attempt by reading your post would be that you have not set up your Java correctly. Your JAVA_HOME points to "D:\JAVA". Are you sure that you have a valid java installation/runtime (jdk) there? Inside this folder there should be a "bin" folder containing java and javac commands.

pleft
  • 7,567
  • 2
  • 21
  • 45