• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Makefile in Java

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic