Ant Build Error Cannot Find Symbol
Contents |
here for a quick overview of the site Help maven build error cannot find symbol Center Detailed answers to any questions you might have error cannot find symbol class builder Meta Discuss the workings and policies of this site About Us Learn more about
Error Cannot Find Symbol Javac
Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
Error Cannot Find Symbol Class
Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ANT - javac compile failure due to cannot find symbol up vote 7 down error cannot find symbol variable vote favorite I'm trying to compile ActionFactory.java file which imports one of my package, RegisterAction.java Here is the file structure: /com/masatosan/actions/register/RegisterAction.java /com/masatosan/redirector/ActionFactory.java According to the ANT output, I think ANT cannot find RegisterAction.java which is imported in ActionFactory.java It does compile successfully when I manually run javac on console so this must be some classpath setting that ANT is not looking at. I know I can add some jar to ANT_HOME/lib but in my case, ANT seems not be able to find ActionRegister.java, not jar or something else. Could anyone help me find out what's wrong? ANT script enabled. Please turn JavaScript back on and error cannot find symbol class googleplayservicesclient reload this page. All Places > Alfresco ECM > Discussions Please error cannot find symbol in java enter a title. You can not post a blank message. Please type your message and try again. http://stackoverflow.com/questions/3844047/ant-javac-compile-failure-due-to-cannot-find-symbol 2 Replies Latest reply on May 21, 2014 4:27 PM by kaynezhang Ant build failed due to dependencies even though they're included. vamirr May 20, 2014 2:09 PM I'm new to ant and working https://forums.alfresco.com/forum/developer-discussions/development-environment/ant-build-failed-due-dependencies-even-though through putting together a build.xml for my alfresco extensions. The build is failing due to dependencies but I don't understand why.. I have included the required dependencies in the build.xml.I would appreciate another pair of eyes. (1)Ant (16)Apache Web Server (8)Bioinformatics (10)Cascading Style Sheets (47)Classes and Objects (14)Database (13)Design Patterns (22)Eclipse (39)Files (62)General Java (69)JSPs (9)Java Basics (11)Linux (23)Logging (5)Maven (88)Search (12)Servlets (20)Struts (1)Text (19)Tomcat (8)Version Control (8)Windows (2)XML (1) How do I compile my project using Ant? Author: Deron Eriksson Description: This Ant tutorial describes how to compile Java classes using the javac task and filesets. Tutorial created using: Windows XP || JDK 1.5.0_09 || Eclipse Web Tools Platform 1.5.1 || Tomcat 5.5.20 Page: 1 2> The AntSW 'javac' task makes compiling classes in a project in EclipseSW very easy. In this short tutorial, we'll utilize the following 'tomcat-demo' project. This is a simple project that features a servletW. This project runs in TomcatSW, so it requires some of the jarW files that come with Tomcat in order to be compiled. The servlet utilizes the commons-lang library, so Ant needs to 'know' about this library when it compiles our JavaSW classes for us. The project also features a test.properties file that we'll copy from the src to the bin directory. Out simple TestServlet class is as follows: TestServlet.java package test; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; public class TestServlet extends HttpServlet { private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("This is the Test Servlet
"); out.println(StringUtils.swapCase("Howdy how are you")); } } The output of this trivial servlet is: This is the Test Servlet hOWDY HOW ARE YOU Let's go ahead and jump right in. To start off, let's create a 'compile' target that utilizes the javac task to try to compile the javaSW files in the src directory (via 'srcdir') and puts the compiled class files in the bin directory (via 'destdir'):