Building the Source Code

LimeWire's standard build environment uses Ant and Sun's Java SDK (version 1.5 or later). We will demonstrate building on the command line below, and also have instructions for building with Eclipse.

Note: See Get Source Code for a video showing how to get the code through Eclipse which will build the code.

1. Make sure you have checked out the LimeWire source code. See Accessing the Source Code if you have not.

2. Set up your build environment.

  • Make sure you have Java installed. We standardize on Sun's SDKs, version 1.5 or higher.
  • Make sure you have Ant installed. Any recent version, such as 1.6.2, should be fine.
  • Make sure you can execute Java and Ant from the command line. You will need to add the binaries' directories to your path, or link the binaries into a directory already in your path.
  • Test your environment setup from your LimeWire code directory by entering the following commands. Both should successfully print out version information similar to the following:
> java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)

> ant -version
Apache Ant version 1.6.2 compiled on July 16 2004

3. Build your code by compiling the core and gui modules. Start in your LimeWire code directory and execute the following commands:

cd core
ant compile-all

You should see Ant building the LimeWire core & components.

cd ..
cd gui
ant compile-all

You should see Ant building the LimeWire gui.

4. Alternatively, you can use the Eclipse IDE to build LimeWire. Create a new project from an existing location and point it to the 'limewire' folder.

5. Execute your code. From the gui directory, execute the following command:

./run

You should see LimeWire start!

At this point, you are ready to make changes. Just rebuild (step 3) and run LimeWire (step 4) to see your changes! If you want to share your code with us, see Contributing Code for details on how to give back to the community.