Using ports, and works in JRuby