To compile a Java program with a JUnit main, use: javac -cp /opt/eclipse/plugins/org.junit4_4.3.1/junit.jar *.java To execute a JUnit main (note colon dot after jar file name): java -cp /opt/eclipse/plugins/org.junit4_4.3.1/junit.jar:. junit.textui.TestRunner YourTestClass To create aliases called junitcompile and junitrun, add these lines to your shell settings (.bashrc in your home directory) Note that there is a tab before the word alias: alias junitcompile='javac -cp /opt/eclipse/plugins/org.junit4_4.3.1/junit.jar' alias junitrun='java -cp /opt/eclipse/plugins/org.junit4_4.3.1/junit.jar:. junit.textui.TestRunner' You will then need to log out and login again or from the command line, type source .bashrc Most of you are using bash as your shell, but if you are using csh or tcsh, edit the .cshrc file and use a space instead of the equal sign in the aliases. Then you can just use the following to compile and run: junitcompile *.java junitrun YourTestClass