codereviewanskquestions
codereviewanskquestions

Reputation: 14008

Block Internet Connection on Eclipse

Is this possible to block all network connections on Eclipse?

My situation is that I have unit tests in Eclipse and I want to see which of the unit tests try to connect to the network. It was hard to figure out from the source code and I think the easiest way to block the connection and see which one will be failed.

Upvotes: 2

Views: 6731

Answers (2)

Bananeweizen
Bananeweizen

Reputation: 22080

Unplug your network cable (or choose the corresponding switch in your operating system). Really, that is faster (and more reliable) than switching the proxies in eclipse manually.

If you repeatedly want to check things like this, then I find running eclipse in a virtual machine very convenient, where you can easily plug/unplug the network connector of the virtual machine by means of a single click, without disturbing your other programs.

Upvotes: 1

TieDad
TieDad

Reputation: 9939

Sometime I do this way:

In Eclipse preference, Genenral->Network Connections, Choose "Active Provider" to "Manual", and set invalid proxies.

Upvotes: 0

Related Questions