项目作者: alexpanov

项目描述 :
Find a free local port (mainly) for testing purposes
高级语言: Java
项目地址: git://github.com/alexpanov/freeportfinder.git
创建时间: 2015-05-05T08:35:52Z
项目社区:https://github.com/alexpanov/freeportfinder

开源协议:The Unlicense

下载


freeportfinder

Build Status
Maven Central

A micro Java library that does one thing and one thing only: finds a free local port (mainly) for testing purposes.

Finding a free local port is as easy as:

  1. int port = FreePortFinder.findFreeLocalPort();

Which can then be used to set up local Jetty without hitting

  1. java.net.BindException: Address already in use

Contributors

Shlomi Alfasi