Eclipe or Netbeans? Netbeans is great for the Swing designer, it is my favorite tool for desktop UI design.
However for the rest of the tasks I prefer Eclipse. Eclipse integration with Ant is very good as the editor reads all the dependencies within the buid.xml and provides all the autocompletion just by loading the project (create a new Java project from existing Ant file). Running the JUnit targets from the build.xml works fine which is something I couldn’t make with Netbeans. Netbeans didn’t find the tests.
Once the project is loaded go to Window menu -> Show view -> Ant. See the Ant view at your right hand side and click on the tiny “Add Buildfiles” button on the top of it. Select the build.xml and you’re done.

My JUnit configuration (slightly modified from this post):

 
   
    
    
   	
    
    
        
    
   	
   	        
   	
   	
   	   	        
   	
   

     
        
            
        
    
    
        
          
        
    

    
        
           
           
           
            
              
            
          
        
    

Exceptions’ stack traces are sent to a file in the project main folder called Test-your_test_case_name.txt
For better output in the Eclipse Console while running the tests, click over the unit_test.run target with the right mouse button (in the Ant view) then “Run as” and then “Ant Build…” and set “-v” in the arguments in the “Main” tab. Note the “debug=on” in the javac target (thanks Nilesh).
The test execution summary is presented for each TestCase rather than altogether so scroll up to watch all
the results (I was wondering why just one TestCase was ran)