Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Makefile for a java project
Makefile for a java project [message #632131] Mon, 11 October 2010 16:55 Go to next message
Marko  is currently offline Marko Friend
Messages: 2
Registered: October 2010
Junior Member
Hello!

I have a java project that I sometimes need to build from a cmdline (for example when logging into the box from ssh).

However, I am used to build my project through eclipse in GUI mode. I am wondering if there is a way to create a C-like Makefile to be able to build the project from within the command line?

Thank you for your help,

M.
Re: Makefile for a java project [message #632201 is a reply to message #632131] Tue, 12 October 2010 05:53 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Marko wrote:
> Hello!
>
> I have a java project that I sometimes need to build from a cmdline
> (for example when logging into the box from ssh).
>
> However, I am used to build my project through eclipse in GUI mode. I
> am wondering if there is a way to create a C-like Makefile to be able
> to build the project from within the command line?
Take a look at Ecipse b3, Maven or Ant.

Dani
>
> Thank you for your help,
>
> M.
Re: Makefile for a java project [message #632470 is a reply to message #632201] Wed, 13 October 2010 05:46 Go to previous messageGo to next message
Walter Harley is currently offline Walter HarleyFriend
Messages: 847
Registered: July 2009
Senior Member
Daniel Megert wrote:
> Marko wrote:
>> Hello!
>>
>> I have a java project that I sometimes need to build from a cmdline
>> (for example when logging into the box from ssh).
>>
>> However, I am used to build my project through eclipse in GUI mode. I
>> am wondering if there is a way to create a C-like Makefile to be able
>> to build the project from within the command line?
> Take a look at Ecipse b3, Maven or Ant.

In particular, note that from Eclipse you can File -> Export an ant build file.
Ant is a tool much like make, that reads an .xml file containing a set of
dependencies and associated actions. For whatever reasons, Ant is much more
common in Java-based projects, even though in principle you could write a
makefile to do the same thing.

Maven is a more extensive tool, that supports a broader swath of the development
process and that has a lot of built-in assumptions about how you do development.
If your development process matches the Maven assumptions, it can be a very
efficient and powerful tool. If not, it can be very painful and troublesome.
Re: Makefile for a java project [message #632958 is a reply to message #632470] Thu, 14 October 2010 19:30 Go to previous messageGo to next message
Neil Snyder is currently offline Neil SnyderFriend
Messages: 1
Registered: October 2010
Junior Member
Having the same issues here as well.
Re: Makefile for a java project [message #633022 is a reply to message #632958] Fri, 15 October 2010 06:48 Go to previous messageGo to next message
Walter Harley is currently offline Walter HarleyFriend
Messages: 847
Registered: July 2009
Senior Member
Neil Snyder wrote:
> Having the same issues here as well.

I'm not sure what issues you mean? Did the prior post (which described
Ant and its relationship to make) address your question?

Please be more specific, if you are looking for help.
Re: Makefile for a java project [message #635552 is a reply to message #633022] Wed, 27 October 2010 10:23 Go to previous message
Marko  is currently offline Marko Friend
Messages: 2
Registered: October 2010
Junior Member
Okay

so I have read the related documentation but I still cannot see how to build a build file automatically.y The project I am working on is quite big and I do not know how to build it manually (there are some cup files, jflex files to be built by external tools as well as some java code.) At the moment this is done by eclipse automatically - is there any way I could generate a script performing the same task as eclipse does now?
Previous Topic:How to suppress javadoc compiler warning for public static attributes?
Next Topic:Eclipse SDK for "hpux.motif.ia64" 64 bit
Goto Forum:
  


Current Time: Sat Apr 20 00:49:46 GMT 2024

Powered by FUDForum. Page generated in 0.02994 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top