0

I'm debugging a Java Swing application that is started via Java WebStart 8.

My network requires me to use a http proxy. This triggers webstart to set the RMISocketFactory to a default implementation.

My problem is the fact I need to use my custom RMISocketFactory.

The code from RMISocketFactory prevents me from resetting it to my custom one:

if (factory != null) {
    throw new SocketException("factory already defined");
}

Is there a safe way to reset is?

Andrei Matei
  • 1,049
  • 2
  • 10
  • 23
  • You don't need to use `RMISocketFactory` at all. It's obsolete. Have a look at `RMIClientSocketFactory.` – user207421 Apr 22 '15 at 08:42
  • Well, ok, but when sun.rmi.transport.tcp.TCPEndpoint#newSocket is called, a call to java.rmi.server.RMIClientSocketFactory#createSocket is made only after sun.rmi.transport.tcp.TCPEndpoint#chooseFactory is called. And chooseFactory() makes a call to RMISocketFactory.getSocketFactory() which is already set by javaws. – Andrei Matei Apr 22 '15 at 10:42
  • Good investigation, but so what? There's nothing there that forces the RMIClientSocketFactory to use what Javaws set. – user207421 May 04 '15 at 21:54

0 Answers0