pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

Java pastebin - collaborative debugging tool View Help


Posted by caiobm on Sat 24 Jan 01:42
report abuse | download | new post

  1. import java.net.*;
  2. import java.io.*;
  3.  
  4. /**
  5.  * @author Caio Bomfim Martins
  6.  */
  7.  
  8. public class ShutLauncher {
  9.        
  10.         public static void main(String[] args) throws Exception {
  11.                 ServerSocket ss = new ServerSocket();
  12.                
  13.                 Socket so = new Socket(args[0],10001);
  14.                
  15.                 OutputStream out = so.getOutputStream();
  16.                
  17.                 PrintWriter pout = new PrintWriter(out, true);
  18.          
  19.                 StringBuilder sb = new StringBuilder();
  20.         
  21.                 for(int i = 1; i < args.length; i++) {
  22.                         sb.append(args[i]);
  23.                         sb.append(" ");
  24.                 }
  25.         
  26.          
  27.                 pout.print("fgt\n");
  28.                 pout.print(sb.toString());
  29.                 pout.close();
  30.         }
  31. }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post