It is not necessary to rebuild Electric from the source code because the downloads are ready to run. For people who wish to explore the source code, this section describes some of the necessary steps.

The first step in building the source code is to extract it from the ".jar" file. To do this, place the ".jar" file in its own directory, change to that directory, and run the following command:
     jar xf electric-version.jar
(Windows users may want to install "cygwin," from www.cygwin.com, in order to more easily run "jar" and other commands.) The "jar" command will create a number of files and folders on your disk:

Electric source code is also available from the GNU Savannah repository with one of these commands:
     svn co svn://svn.savannah.gnu.org/electric/trunk
     svn co http://svn.savannah.gnu.org/electric/trunk

which will extract the code into the current directory (preferably a clean directory with nothing else in it).

The next step is to get a version of Java that can build source code. Although a "JRE" (Java Runtime Environment) is sufficient for running Electric, it is not able to build the source code. For that, you must have a "JDK" (Java Development Kit). In addition, you may want to use an IDE (Integrated Development Environment) such as NetBeans (at www.netbeans.org) or Eclipse (at www.eclipse.org).

Running under Eclipse

Here are some notes about building Electric under Eclipse:

Running under Netbeans

The best way to use Netbeans is to extract the source code from the Savannah repository, as described above. If you do this, you will have a directory called "trunk". The first step is to add the Bean Shell to the build, which can be done by changing to the "trunk" directory and running the "make" command.

Next start Netbeans and open the "electric-netbeans" project that is in the "trunk" folder. You should be able to build the man project (under the "Run" menu)and then run or debug the main project.

Using Ant

"Ant" is a scripting system for building Java programs, and Electric comes with an Ant script file called "build.xml". Once the source code is extracted, you can build Electric simply by typing Ant commands. The Ant target "runFromBin" will build and run Electric. The Ant target "jarForGNUBinary" will build a new ".jar" file from the source code.

Note that when using Ant, there are some Macintosh vs. non-Macintosh issues to consider.