GeeCON Prague 2014*
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


JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "javac question" Watch "javac question" New topic
Author

javac question

Payam Fard
Ranch Hand

Joined: Jan 31, 2003
Posts: 73
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?

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

Joined: Jan 31, 2003
Posts: 73
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"/>
Thanks,
Payam.
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

I used to do it like e.g.:

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

Regards, Rene Larsen
Dropbox Invite
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javac question