I should distinguish between a Java applet and a Java application. The project I am working on is of the latter type. Applications can indeed open connectionsto wherever they like as you define the URL address as part of the URL class. (See doc:///doc/api/net.www.html.URL.html#_top_ for more details)
For more information about Java security see doc:///doc/security/security.html
Dave Weeks.
http://eeisun2.city.ac.uk/~ftp/Guinness/Hello.html