aspose file tools*
The moose likes Java in General and the fly likes Makefile in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Makefile in Java" Watch "Makefile in Java" New topic
Author

Makefile in Java

Phil Lesh
Greenhorn

Joined: Oct 16, 2002
Posts: 17
Can anyone please give me an example of a makefile for java. i.e. a makefile which compiles a couple of .java files. Thanks a lot!
Phil
Greg Brouelette
Ranch Hand

Joined: Jan 23, 2002
Posts: 144
Phil:
It's been a long time since I wrote a makefile for Java. I ran into so many issues trying to build a make file that worked in Windows and in Linux (even with Cygwin on Windows) that when ANT came out I jumped ship and started using ANT exclusivly. ANT is available at http://jakarta.apache.org/ant/index.html and I can talk you through that.
The problem was that so much of a make file is actually shell programming (CShell, Bash, or DOS Batch file) and the bash shell on Linux was implemented slightly differently than the way that Cygwin implemented it in Windows. I just couldn't find enough common ground to make it compile in both.
Years ago I wrote a how-to about using makefiles with java on the JGuru site but that site ( www.jguru.com ) seems to be down at the moment. If there's a reason that you need to use make files instead of ANT then I may be able to find some of my old code when I get home tonight and email it your way.
Greg


For a good Prime, call:<br />29819592777931214269172453467810429868925511217482600306406141434158089
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Trust Greg! Save yourself from creating that flat spot on the side of your head from beating it against the wall and get ant running on your system. Your head will thank you.
hth,
bear
[ December 03, 2002: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: Makefile in Java