Question: Problem in running Junit tests in eclipse 3.4.1 on Mac OS

I am getting this error:
'Lanuching AllTests' has encountered a problem. 
Cannot connect to VM.

```

!ENTRY org.eclipse.core.net 1 0 2009-01-29 10:07:44.047
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.25
4/16|*.169.254/16 by an external source. This value will be overwritten using th
e values from the preferences

!ENTRY org.eclipse.jdt.launching 4 120 2009-01-29 10:42:59.295
!MESSAGE Cannot connect to VM
!STACK 0
java.net.SocketException: Socket closed
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
        at java.net.ServerSocket.implAccept(ServerSocket.java:450)
        at java.net.ServerSocket.accept(ServerSocket.java:421)
        at org.eclipse.jdi.internal.connect.SocketTransportService.accept(Socket
TransportService.java:95)
        at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTra
nsportImpl.java:56)
        at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(
SocketListeningConnectorImpl.java:135)
        at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable
.run(StandardVMDebugger.java:107)
        at java.lang.Thread.run(Thread.java:613)

```

Answer: 
This is what I did that solved my problem (Eclipse on MacOSX Lion):

* Go to project properties->Java Build Path->Libraries
* Add JRE System Library
* Go to Order and Export tab, move JRE System Library up to top.

Hope it helps.
For other folks having this problem but not trying anything related to android within their elcipse/Mac OS X Leopard - in case you are compiling against JRE 1.6 (ie. soylatte's hack release, since Leopards do not naturally support Java 1.6), what has worked for me was to manually remove the fake 1.6 VMs from eclipse and add the real one from Preferences->Java->installed JREs

Good luck!