Starts execution of the program, requiring a port number as an argument. @param args @throws Exception
(String[] args)
| 78 | * @throws Exception |
| 79 | */ |
| 80 | public static void main(String[] args) throws Exception { |
| 81 | if (args[0] != null) { |
| 82 | start(Integer.parseInt(args[0])); |
| 83 | } else { |
| 84 | System.out.println("usage:\ndownload: java main.java.nc.NetcatServer [port] < [original-file]\nupload: java main.java.nc.NetcatServer [port] > [uploaded-file]"); |
| 85 | } |
| 86 | } |
| 87 | } |