While executing build.xml i am getting following error
[javac] [javac] D:\ABN\WSAbnjags\src\com\indussoft\Jags\Transactions\QueryModule\JTS L_QMSessionBean.java:204: cannot resolve symbol [javac] symbol : class LSSystemException [javac] location: class com.indussoft.Jags.Transactions.QueryModule.JTSL_QMS essionBean
I want to create ANT script to compile java file which is located at com\indussoft\Jags\Transactions\QueryModule folder
for that purpose i also have to extends one class name LSSystemException
Your srcDir and distDir are incorrect. The should both be "src". (Well, actually, I disagree with placing compiled class file in the same directory as the Java source file, but that is a topic for another discussion.) Also, this location is incorrect:
Though not knowing you directory structure and the exact location of the LSSystemException class, I could not offer a better gues than to change it to:
By the way, the issue here is one of not understanding how package names relate to directory names. You will probably want to review that information from a basic Java programming text. It is a key concept in being able to understand how Java applications (a misnomer if there was one) are structured.
I assume that the com directory is in the src directory and that build.xml is located in the parent directory of the source directory. In other words, you have this:
If that is true, try these changes:
All of your Java source files are in the src directory, and based the destdir setting, all class files are also in src. Therefore you do not need to include any information about those directories in the classpath - all you need are the jar files. And because you have all of your JAR files in the src directory, using a fileset to declare them is easier than using individual path element.