jar - Why won't signed java applet connect to external server? -


i have java applet trying create vnc connection host (note host running applet , vnc host not same). more info on code i'm working can found here

i got code compile xenserverconsole.jar put in root of webserver along folder structure com/citrix/xenserver/console/. (the console folder has .java, .class , .png files).

i signed xenserverconsole.jar file this:

keytool -genkey -validity 3650 -keystore pkeystore -alias keyname keytool -selfcert -keystore pkeystore -alias keyname -validity 3650 jarsigner -keystore pkeystore xenserverconsole.jar keyname 

and i'm loading applet in html code:

<applet code="com/citrix/xenserver/console/initialize.class"     archive="/xenserverconsole.jar"     width="800" height="600">     <param name="session" value="<%= @console_session %>">     <param name="url" value="<%= @console_url %>">     <param name="useurl" value="true"> </applet> 

for reason i'm still getting socket permission error, here's console output:

loading ui... initializing... starting main... creating controls... adding controls... starting... connection failed: access denied (java.net.socketpermission 192.168.0.2:443 connect,resolve) connection closed reconnecting in 5 seconds... 

i thinking signing jar file throw warning when user accessed html page, , if accepted connect other server fine. i'm getting run / cancel prompt on windows (not osx) still socketpermission error.

why code still throwing error?

i figured out. first found time working applets need make sure clearing classloader cache each test. this, focus on java console , press "x" (at least that's how works on os x - safari).

signing applet listed above did work, seen in comment on original question after flushed classloader cache didn't socketpermission anymore still failed, here's why:

the java applet, though served web server running on local computer, , in instance applet trying connect url local computer didn't have access to, web server did. why getting timeout / npe error. (the server trying vnc on web server's lan, not accessible via web).

so need create tunnel web server vnc target , specify connection information in applet's html code. beyond scope of question.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -