Calling ping is not a good idea as it runs endlessly on some platforms, do a Java connection test instead