OmegaT HowTo:
Compiling OmegaT from the source code

This HowTo describes how to compile OmegaT from the source code.

OmegaT is supplied ready-compiled for a number of platforms, including a cross-platform version. Users do not therefore need to compile OmegaT themselves. Compiling OmegaT is relevant for developers who wish to make modifications of their own to its code.

1. Download and install the Java Development Kit (JDK) and Apache Ant

Various programs can be used to compile the source code again after you have modified it, but among the most convenient is Apache Ant. The Java Development Kit (JDK) is also required.

Depending upon how you install the Java Development Kit, you may have to change your "JAVA_HOME" attribute in order for it to function with Ant.

2. Compile the code

The folder names indicated below are for illustration only; version numbers will change.

Open a command-line window (console, DOS window). Change folder to the main folder in the OmegaT source code (the folder containing the file build.xml), e.g.

cd C:\My Documents\MyOmegat\OmegaT_2.2.3_Beta_Source

From within this folder, execute Apache Ant by entering the ant executable. It may be necessary to enter the full path, e.g.:

C:\Program Files\apache-ant-1.7.0-bin\apache-ant-1.7.0\bin\ant

If the code compiles successfully, you will see the "BUILD SUCCESSFUL" message. If not, debugging messages will be shown which will (hopefully) provide some idea of where the problem is.

3. Launch OmegaT

If your code has compiled successfully, the compiled OmegaT is placed in:


Still in your command-line window, change to this folder, e.g. with:

cd C:\My Documents\MyOmegat\OmegaT_1.8.0_01_Beta_Source\dist

and launch OmegaT with:

java -jar OmegaT.jar

4. An example modification

In the folder


open the file in a text editor.

Find the lines:

return Styles.createAttributeSet(fg, Styles.COLOR_GREEN, true, null);


b = Styles.COLOR_GREEN;

and replace




In the folder


open the file in a text editor.

Find the line

public static final Color COLOR_GREEN = new Color(192, 255, 192);






192, 255, 192


225, 225, 255.

Compile and test as described above.

Copyright Marc Prior 2011