To compile a Java program with a JUnit main on Linux, 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:. org.junit.runner.JUnitCore testClassName To create aliases called junit4compile and junit4run, 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:. org.junit.runner.JUnitCore' 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 At home on Mac OS X use this to compile: javac -cp /Applications/Local/eclipse/plugins/org.junit4_4.3.1/junit.jar *.java At home on Mac OS X use this to run: java -cp /Applications/Local/eclipse/plugins/org.junit4_4.3.1/junit.jar:. org.junit.runner.JUnitCore TestCase