This is the problem I'm trying to solve. I have a java thick client (v1.3.1) which will create a socket server on a port number. The port number is determined at runtime. Once the socket server is running, I need to make the port number available to an active x control running in a browser on the same desktop. The active x control will then open a socket connection to the socket server running in my java thick client.

My problem is how do I communicate the port number back to the active x control ? I thought of having my java code update a Windows user environment variable which the active x control could then read from.

However I do not how to do this as the System.setProperty(key, value) method only updates the property within the JVM, not on the actual desktop.

Please note that for security reasons that I wont go into, we've been told that we cannot do this via updating some local file on the filesystem.

Any help is appreciated.