import javax.imageio.*; import java.awt.image.*; import java.awt.*; import java.security.NoSuchAlgorithmException; import java.security.MessageDigest; import java.lang.reflect.*; import java.net.*; import java.io.*; import javax.swing.*; import java.util.regex.*; import java.util.List; import java.util.zip.*; import java.util.*; public class main { static int port = 1234; public static void main(String[] args) throws Exception { print("Helloing " + port); Socket s = new Socket("localhost", port); OutputStream out = s.getOutputStream(); out.write("hello!\n".getBytes("UTF-8")); s.close(); print("Done!"); } static void print() { System.out.println(); } static void print(Object o) { System.out.println(o); } static void print(long i) { System.out.println(i); } }