Default to ipv4

Use JVM_OPTS environment variable
Prefer ipv4 by default
Remove unused import