This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes javac question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "javac question" Watch "javac question" New topic

javac question

Payam Fard
Ranch Hand

Joined: Jan 31, 2003
Posts: 75
Hi all,
I am trying to compile all the java files in directory, directoryadmin, daoframework and opensource directories.
For some reason, the following task does not do anything!!! When I run an compile, nothing happens. Any ideas why?
Also, when I create a jar file out of the class files, how would I use ant to do the following:
"jar umf" to change the Main-Class in my manifest file?

<target name="compile" depends="init">
<javac destdir="build/classes"
classpath="../directoryadmin/jars/*.jar, C:/forte4j/lib/ext/">
<include name="../daoframework/**"/>
<src path="../directoryadmin/"/>
<src path="../directory/"/>
<src path="../opensource/"/>
Payam Fard
Ranch Hand

Joined: Jan 31, 2003
Posts: 75
Well, For some reason, when I add includes or excludes under javac, it ignores the whole task and does not do anything at all!!! Any ideas?
Looks like <src path="..."/> statements are fine, but for some reason, it cannot find the classes that are inside the jar files that I have included in the classpath.
Also, how can I say only compile java files? I have tried the following, but does not work:
<src path="../directory/**/*.java"/>
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

I used to do it like e.g.:

Hope this helps..
[ February 26, 2003: Message edited by: Rene Larsen ]

Regards, Rene Larsen
Dropbox Invite
I agree. Here's the link:
subject: javac question
It's not a secret anymore!