• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Makefile in Java

 
Phil Lesh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic