The real message is that Ant can’t find com.sun.tools.javac.Main
.
Which, together with the fact that the latest “Sun” (Oracle) JDK is 1.7.0_13 (or maybe _14, but definitely not the “_52” that your install dir indicates), makes me think that you’re not using a distribution that Ant recognizes. You can verify this by running jar tvf $JAVA_HOME/lib/tools.jar
, and looking for that class.
The Ant Manual talks about ways to work with different compilers. Since I’ve only used “Sun” compilers, I’m afraid that I can’t give you any pointers.
Edit: you could also try setting fork="yes"
in your build file. This should run the compiler executable rather than trying to invoke the compiler class.
Related Posts:
- How to solve could not create the virtual machine error of Java Virtual Machine Launcher?
- How to solve could not create the virtual machine error of Java Virtual Machine Launcher?
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
- “insufficient memory for the Java Runtime Environment ” message in eclipse
- Control an Arduino with Java
- How do I resolve the “java.net.BindException: Address already in use: JVM_Bind” error?
- what is this ANT build?
- Integrate Ant builder into Eclipse: Error “Variable references empty selection”
- eclipse won’t start – no java virtual machine was found
- How can I avoid this Ant Build error?
- Eclipse returns error message “Java was started but returned exit code = 1”
- How to clear console in Java – Eclipse
- Java error no lwjgl64 in path?
- Can’t start Eclipse – Java was started but returned exit code=13
- “Error occurred during initialization of VM; Could not reserve enough space for object heap” using -Xmx3G
- How to uninstall Eclipse?
- “Error occurred during initialization of VM; Could not reserve enough space for object heap” using -Xmx3G
- Editor does not contain a main type in Eclipse [duplicate]
- JRE Missing when installing eclipse
- How can I use ant
to execute commands on linux? - A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1
- Server Tomcat v9.0 Server at localhost failed to start
- Cannot find “Package Explorer” view in Eclipse
- Why Maven project is tied to J2SE-1.5 by default?
- JVM Crash – “EXCEPTION_ACCESS_VIOLATION”
- what does Dead Code mean under Eclipse IDE Problems Section
- Eclipse: Java was started but returned error code=13
- Opening JSF Facelets page shows “This XML file does not appear to have any style information associated with it.”
- The program can’t start because cygwin1.dll is missing… in Eclipse CDT
- Eclipse C++ : “Program “g++” not found in PATH”
- Unbound classpath container in Eclipse
- How to change a package name in Eclipse?
- ‘cannot open git-upload-pack’ error in Eclipse when cloning or pushing git repository
- Eclipse “Error: Could not find or load main class”
- Error: Selection does not contain a main type
- “Server Tomcat v7.0 Server at localhost failed to start” without stack trace while it works in terminal
- java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer
- “Could not find Java SE Runtime Environment.” after installing Java
- The declared package does not match the expected package “”
- How to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven Builds
- eclipse won’t start – no java virtual machine was found
- Access restriction: The type ‘Application’ is not API (restriction on required library rt.jar)
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- Eclipse error, “The selection cannot be launched, and there are no recent launches”
- Failed to load the JNI shared Library (JDK)
- Java can’t find file when running through Eclipse
- Program “make” not found in PATH
- Eclipse java debugging: source not found
- No appenders could be found for logger(log4j)?
- Syntax error on token(s), misplaced construct(s)
- Error occurred during initialization of VM (java/lang/NoClassDefFoundError: java/lang/Object)
- web.xml is missing and
is set to true - Corrupt jar file
- Installing WindowBuilder on Eclipse Neon
- Fatal error compiling: tools.jar not found:
- eclipse for chrome?
- Java project in Eclipse: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
- Can eclipse be configured to automatically fix missing Imports?
- How to import a jar in Eclipse
- “The import org.springframework cannot be resolved.”
- Node cannot be resolved to a type
- Resource leak: ‘in’ is never closed
- Program “make” not found in PATH
- Java console program
- implicit super constructor object() is undefined. must explicitly invoke another constructor
- Importing Maven project into Eclipse
- “Source folder is not a Java project” error in eclipse
- Cannot be resolved to a variable error in Eclipse
- Using JavaFX in JRE 8, “Access restriction” error
- Eclipse Problems View not showing Errors anymore
- ‘No JUnit tests found’ in Eclipse
- “Cannot be resolved to a type” when attempting to use Scanner
- Resolving File paths – ‘File not found’ error in Eclipse
- java eclipse red exclamation mark
- Eclipse is executing the wrong Java file
- How to show the Project Explorer window in Eclipse?
- Avoiding “resource is out of sync with the filesystem”
- “insufficient memory for the Java Runtime Environment ” message in eclipse
- Unknown version of Tomcat was specified in Eclipse
- Which Eclipse IDE version to choose?
- Push eclipse project to GitHub with EGit
- Eclipse IDE – Error: Build path specifies execution environment Java SE 1.7
- Eclipse IDE – Error: Build path specifies execution environment Java SE 1.7
- Eclipse IDE – Error: Build path specifies execution environment Java SE 1.7
- How to open an existing project in Eclipse?
- Java says this method has a constructor name
- How can i fix this equals on primitive type(int)
- Error :- java runtime environment JRE or java development kit must be available in order to run eclipse
- The import org.junit cannot be resolved
- Wrong project is being run in Eclipse
- How fix Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
- Maven dependency update on commandline
- The import javax.servlet can’t be resolved
- How to enable the Java keyword assert in Eclipse program-wise?
- Why “no projects found to import”?
- Error message ‘Cannot be resolved or is not a field’
- How to open Console window in Eclipse?
- How do I enable index downloads in Eclipse for Maven dependency search?