views:

234

answers:

4

Hi, I am new in Java and I need some information. What is file build.xml? I mean I have a university project which I should extend. It contains also a build.xml. I was wondering if it is a possibility to import this project in eclipse or netbeans using this build.xml. I tried to import the project but I get some errors since one part is created using J2ME and the other J2SE and I guess this file should be the configuration.

Anybody any Idea?

Thanx, Granit

+7  A: 

build.xml usually is an ant build script.

It contains information necessary to build the project to produce the desired output, be it Javadocs, a compiled project, or a JAR file.

I believe Eclipse has ant built-in, so it should be possible to execute the build.xml by choosing "Run As..." and "Ant Build".

The build.xml file, if it is an ant script, is not used to import the project into an IDE like Eclipse or Netbeans. A build script is used to build the project (or produce some desired output) rather than an mechanism for importing the project into an IDE.

coobird
A: 

A build script for ant, I guess?..

Ashalynd
A: 

Eclipse can be told to build using an Ant script, but you can also use Ant itself.

dj_segfault
A: 

As mentioned by @coobird this is an ant build file. Although IDEs such as Eclipse and Netbeans have ant support built-in, it is also possible to run ant from the command-line and this may be the simplest way to get started if the project has been well created.

See http://ant.apache.org/ for docs.

If you want to try this approach, install ant, cd to the directory with build.xml and issue

ant
peter.murray.rust