Output HTML with syntax highlight from Java Code

This plugin for eclipse is brilliant for including source code in computer science reports: http://www.java2html.de Remember to go to Window -> Preferences -> Java -> Java2HTML: Show line numbers Show file name Show Table border Tabulator size 2

Ant cannot find JRE to run JUnit tests

Sometimes Ant cannot find the JRE to run the JUnit tests – this can easily be fixed by right clicking on the build.xml file, selecting “Run As..” -> “External Tools Configuration”. Choose the JRE tab far to the right and select the JRE that the workspace also runs. Eclipse 3.6.1 Linux General, Junit 4.0 and […]

JUnit jar classpath error in Eclipse

When trying to develop unit tests using JUnit 4 and Ant 1.71 in Eclipse 3.6.1, I kept getting this error even though I had added JUnit.jar to the Eclipse buildpath: The <classpath> for <junit> must include junit.jar if not in Ant’s own classpath The solution was to do the following: Window -> Preferences -> Ant […]