You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Balasubramanian S <Ba...@lucid.co.in> on 2001/05/04 07:27:55 UTC

Ant Experts help me !!!!!!

Hi all
  Iam facing the problem .Iam having the directory structure like this
  
  Root dir
    - classes
       - sun
          - com 
             *.class
    - jar
    - docs
    - src 
       - sun
          - com
             *.java


  1)I have placed all the jar files in the jar dir .
  2)I have placed the java source files under src directory
    and it is under sun.com package 
  3)I have placed the class files under classes directory
    and it is under sun.com package 
  4)I have placed the build.xml and another xml under root directory
  5)One of my class will parse the xml and print the result

  I Hope u can understand the above mentioned details .When i run 
  the ant ,iam getting the some exception 

  Exception message :-
  ------------------
  java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:69)
        at java.util.zip.ZipFile.<init>(ZipFile.java:84)
        at
org.apache.tools.ant.AntClassLoader.getResourceStream(AntClassLoader.
java, Compiled Code)
        at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java, Co
mpiled Code)
        at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:446
)
        at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java, Co
mpiled Code)
        at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java,
Compiled Co
de)
        at gd.xml.XMLParser.readDocument(XMLParser.java, Compiled Code)
        at gd.xml.XMLParser.parseXML(XMLParser.java:82)
        at gd.xml.tiny.TinyParser.parseXML(TinyParser.java:35)
        at gd.xml.tiny.TinyParser.parseXML(TinyParser.java:66)

  
  Build.xml Snippet code
  ------------------------

 <target name="OracleTest" depends="copy">
 <java classname="sun.com.ParseTest">
 <classpath>
 <pathelement location="${JARDIR}\parse.jar"/>
 <fileset dir="${JAR}">
 <include name="**/*.jar"/>
 </fileset>
 </classpath>
 </java>
 </target>

  I have included the root dir in my classpath .
  I dont why the particular xml file is not getting loaded .Could u give me
some suggestion / idea to me .Expecting reply me asap

  Thx
  Bala