try { RMISocketFactory.setSocketFactory(new sun.rmi.transport.proxy.RMIHttpToCGISocketFactory()); } catch (IOException ignored) { } (new BankClientFrame()).show();