import java.io.*;
import java.net.*;
import java.util.*;
import java.net.ServerSocket;

public class JMP {
    public static void main(String[] args) throws IOException {
        String mysqlHost = System.getProperty("mysqlHost");
        int mysqlPort = Integer.parseInt(System.getProperty("mysqlPort"));
        int port = Integer.parseInt(System.getProperty("port"));
        boolean listening = true;
        ServerSocket listener = null;
        ArrayList<Proxy_Plugin> plugins = new ArrayList<Proxy_Plugin>();
        
        try {
            listener = new ServerSocket(port);
        }
        catch (IOException e) {
            System.out.println("Could not listen on port");
            System.exit(-1);
        }
        
        String[] ps = System.getProperty("plugins").split(",");
        
        while (listening) {
            plugins.clear();
            for (String p: ps) {
                try {
                    plugins.add((Proxy_Plugin) Proxy_Plugin.class.getClassLoader().loadClass(p).newInstance());
                }
                catch (java.lang.ClassNotFoundException e) {
                    continue;
                }
                catch (java.lang.InstantiationException e) {
                    continue;
                }
                catch (java.lang.IllegalAccessException e) {
                    continue;
                }
            }
            new Proxy(listener.accept(), mysqlHost, mysqlPort, plugins).start();
        }
 
        listener.close();
    }
}

@@ -644,19 +644,17 @@
 tem.
-out
+err
 .print
-ln
 (%22Co
@@ -675,16 +675,18 @@
  on port
+%5Cn
 %22);%0A    
@@ -834,37 +834,8 @@
 ) %7B%0A
-            plugins.clear();%0A
     
@@ -993,24 +993,87 @@
 nstance());%0A
+                    System.err.print(%22Loaded plugin %22+p+%22%5Cn%22);%0A
             
@@ -1131,32 +1131,103 @@
 dException e) %7B%0A
+                    System.err.print(%22Failed to load plugin %22+p+%22%5Cn%22);%0A
                 
@@ -1311,32 +1311,103 @@
 nException e) %7B%0A
+                    System.err.print(%22Failed to load plugin %22+p+%22%5Cn%22);%0A
                 
@@ -1491,32 +1491,103 @@
 sException e) %7B%0A
+                    System.err.print(%22Failed to load plugin %22+p+%22%5Cn%22);%0A
                 
@@ -1709,24 +1709,53 @@
 s).start();%0A
+            plugins.clear();%0A
         %7D%0A %0A

Optimize plugin loading, add error messages