I have built a small webstart application which uses RMI.


Server:
ServerGetTime timer = new ServerGetTime();
UnicastRemoteObject.exportObject(timer, 0);
Registry registry = LocateRegistry.createRegistry(1099);
registry.rebind("TimeServer", timer);


Client:
Registry registry = LocateRegistry.getRegistry("<server-ip>", 1099);
server = (ServerGetTimeInt) registry.lookup("TimeServer");


The client application uses webstart to run and connect to the RMI server. jar files are signed. If the client connects directly to the internet everything works fine.

If the client is located behind a http proxy (with login required), it cannot find its way to the server and returns following error message:

java.rmi.ConnectException: Connection refused to host: <server-ip>
java.net.ConnectException: Connection timed out

even after proxy and user parameters have been entered correctly into the java program.

Behind the http proxy, if I start the client as a local application using:

java -classpath . -Djava.security.policy=./allaccess.policy -jar client.jar

it also works fine

I wonder what I am doing wrong or what I am forgetting. Could please anybody help?

With a direct internet connection the webstart application runs fine. When the client is behind a proxy server, it only works as local application but not as a webstart application.

This is the jnlp file: (webstart is called from a https site)

<?xml version="1.0" encoding="utf-8"?>

<!-- JNLP File -->
<jnlp spec="1.0+" codebase="https://<server-ip>/myAppl" href="myAppl.jnlp">

<information>
<title>MyAppl</title>
<vendor>Test</vendor>
<homepage href="https://<server-ip>/myAppl"/>
<description>Test</description>
<description kind="short">Test</description>
<shortcut online="true">
<desktop/>
<menu submenu="Test"/>
</shortcut>
<icon href="pict/test.gif"/>
<icon kind="splash" href="pict/test.jpg"/>
<offline-allowed/>
</information>

<security>
<all-permissions/>
</security>

<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" java-vm-args="-Djava.security.policy=H:\\allaccess.policy"/>
<jar href="client.jar"/>

</resources>

<application-desc main-class="test.client.MyAppl"/>

</jnlp>

Please help!
Cheers, Frank