Fixed a compile bug and exposed the select timeout parameter for java bindings