This week's giveaway is in the Spring forum.
We're giving away four copies of Microservices Testing (Live Project) and have Chris Love & Andres Sacco on-line!
See this thread for details.
Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

ANT classpath

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have project folder.
1)testscript
2)java
3)classes

inside java folder some java files are there.and inside classes folder all the class files exist.(this class files genereted from java folder java files)

now inside testscript one java file is there..I have to compile this class using ANT.but in this class I am using some classes which is inside java folder.
so when I am compiling the the testscript java file it is sayinh package does not exixt.because these package is refering to java folder.so this is
class path problem.so can someone tell me how to metion classpath for other package

here is my build.xml file


<?xml version="1.0" encoding="UTF-8"?>
<project name="sonnetframwwork1"
xmlns:vss="antlib:org.apache.ant.vss" basedir=".">
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
<!--ANT 1.7 is required
-->
<property name="build_dir" value="D:/Project13/sonnetframwwork1/classes"/>
<property name="testdata" location="D:/Project13/sonnetframwwork1/testdata"/>

<path id="project.classpath">
<fileset dir="D:\Project13\sonnetframwwork1\references">
<include name="*.jar"/>
</fileset>
<fileset dir="${build_dir}">
<include name="*.class"/>
</fileset>
</path>
<fileset dir="testdata">
</fileset>
<fileset dir="D:\Project13\sonnetframwwork1\testscripts">
</fileset>
<target name="create">
<mkdir dir="D:\Project13\sonnetframwwork1\classes"/>
<mkdir dir="D:\Project13\sonnetframwwork1\jar"/>
</target>
<target name="compile">
<javac destdir="D:\Project13\sonnetframwwork1\classes" debug="true" srcdir="D:\Project13\sonnetframwwork1\java">
<classpath refid="project.classpath"/>
</javac>
</target>
<target name="compile1" depends="compile,jar">
<javac srcdir="D:\Project13\sonnetframwwork1\testscripts" destdir="D:\Project13\sonnetframwwork1\testscripts"
classpathref="project.classpath"/>
</target>
<target name="jar" depends="compile">
<jar destfile="D:\Project13\sonnetframwwork1\jar\SahiProject.jar"
basedir="classes">
</jar>
</target>
<target name="run">
<java classname="TestExecute" classpath="${build_dir}"/>
</target>
</project>


I am getting this problem when i say "Ant compile1"


 
reply
    Bookmark Topic Watch Topic
  • New Topic