Hi,
try to open a telnet connection to the relevant server / port (from your java box).
If this is NOT working, i suggest to check your firewall settings. If it's working it could be a problem with the gateway security of the target system (ABAP).
kind regards,
Martin