Posted by
Leigh McRae on
Jun 17, 2011; 1:20am
URL: https://forum.jogamp.org/Applet-guidance-tp3074641.html
Hi,
I could use a push, not a full hand holding, just an overview to help me get me going. I'm working on getting my applet to open a TcpSocket connection to a host that is different from the web server that is hosting the applet. I'm getting a security error and assume I need to sign my applet.
java.security.AccessControlException: access denied (java.net.SocketPermission xx.xx.xx.x:xxxx connect,resolve)
I have managed to get a JOGL applet deployed and render some basic 3D. At the end of this post is my html and jnlp.
Questions:
1) Do I need to sign my applet? I thought I saw somewhere that JOGL could deliver my applet and only have the user accept the JogAmp certificate.
2) If I do need to sign my applet, can I just use my own key store that I create or do I need to go online and have someone register it for me?
3) I see people using JNLPAppletLauncher. Why would I need or want to use this?
Thanks for anytime spent.
index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Odin</title>
</head>
<body>
<script src="http://www.java.com/js/deployJava.js"></script> <script>
var attributes = { code:'com.lonedwarfgames.odin.browser.OdinBrowser', archive:'odin.jar', width:1024, height:768 } ;
var parameters = { jnlp_href: 'odin.jnlp' } ;
deployJava.runApplet(attributes, parameters, '1.5');
</script></body>
</html>
odin.jnlp
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" href="odin.jnlp">
<information>
<title>Odin</title>
<vendor>Lone Dwarf Games Inc</vendor>
</information>
<resources>
<j2se href="
http://java.sun.com/products/autodl/j2se" version="1.5+"/>
<property name="sun.java2d.noddraw" value="true"/>
<jar href="odin.jar" main="true" />
<extension name="jogl-all-awt" href="
http://jogamp.org/deployment/webstart/jogl-all-awt.jnlp" />
</resources>
<applet-desc
name="Odin"
main-class="com.lonedwarfgames.odin.browser.OdinBrowser"
width="1024"
height="768">
</applet-desc>
</jnlp>