This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes What should i give in the <pathelement> path attribute to find a class defined in a package? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "What should i give in the <pathelement> path attribute to find a class defined in a package?" Watch "What should i give in the <pathelement> path attribute to find a class defined in a package?" New topic
Author

What should i give in the <pathelement> path attribute to find a class defined in a package?

Vish Joshi
Greenhorn

Joined: Dec 22, 2010
Posts: 16
<project default="dir" >
<property name="build" value="Build"/>
<target name="dir" >

<javac srcdir="../Build1" destdir="." includes="hello.java"/>
<java classname="hello">

<classpath>
<pathelement path="Build1/convergys"/>
</classpath>

</java>

</target>
</project>

Folder Structure is like this:-
Build
->com
->hello.class
->build2.xml



Vish Joshi
Greenhorn

Joined: Dec 22, 2010
Posts: 16
hello.class is in "com" package
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3816

You can set it to a property which points to the top level directory of your classes.


Check Path-like structures for more information.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What should i give in the <pathelement> path attribute to find a class defined in a package?
 
Similar Threads
Why classpath refid (newbie)?
Ant build - With weblogic 10
[Ant] Classpath issues building from multiple source trees
Build failed- ejb3.deployer not found
may be some bugs inside schemaexport ?