Two Electric downloads are available from the Free Software Foundation (GNU): with and without source code. Therefore it is possible to build Electric from the source code in the download. Note, however, that this is not the preferred way to access the source code because it does not include the various dependencies. The preferred way to access the source code is to use Maven and to access the code on java.net.

To extract the source code from the ".jar" file, place it 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:

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.