1

It seems that with the latest Java update, 1.7.0u45, my JNLP application that is supposed to connect to a server is instead forced to try and connect to localhost for some reason that I cannot quite seem to figure out.

I know that some other changes have been made, such as requiring the Permissions attribute in the manifest and some such things, which I'm currently trying to figure out a reasonable way to comply to, but I cannot find anything that ought to cause this behavior.

My code just does an ordinary Socket.connect call to a specific server, but what happens is that the connection is instead made to localhost. This only happens when the code is running in the JNLP client; not when I run it "manually" by starting the VM on it.

Does anyone know why this is?

4

1 回答 1

0

最后,我设法弄清楚发生了什么。事实上,并不是这样的连接被重定向,而是 JNLP 客户端已开始阻止未签名的 JNLP 文件设置具有特定名称的系统属性。jnlp特别是,似乎只有名称以开头的属性才能保证可以通过未签名的 JNLP 文件进行配置。

因此,问题是我通过名称不以 开头的系统属性指定要连接的服务器jnlp,然后它被阻止(因为我的 JNLP 文件未签名)导致我的程序使用其默认服务器规范代替,是本地主机。

于 2013-11-01T16:42:41.227 回答