We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Java Security Popups (Read 962 times)
Java Security Popups
Jan 28th, 2009, 11:50am
 
I'have trouble to export opengl sketches to web applets. There's a Java Security Warning per jar. I tried  to sign applets (http://www.processing.org/hacks/hacks:signapplet) and it doesn't seems to have any effect in my browser. (I'm using Opera+Ubuntu+java-1.5.0-sun-1.5.0.15/jre).

gluegen-rt have been added, and I use an external library; 5 different jars, then you need to accept 5 times Java Security prompts.

I tried to recombine jars (core.jar+opengl.jar+extraLib.jar) in one jar, but it doesn't seems to work (I didn't tried with gluegen-rt and jogl because of the native links).

Is it possible to reduce the number of prompts? When you accept permenently, why Java is still prompting for Java Security? Does it depends on Java version or the browser?


Code:
<param name="archive" value="p5/@@theClass@@.jar,opengl.jar,jogl.jar,gluegen-rt.jar,extraLib.jar,core.jar" /> 



Here's to extended part of how the object is called:
Code:
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" 

codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0_15-windows-i586.cab"
width="800" height="400"
standby="Loading Processing software..." >
<param name="code" value="com.sun.opengl.util.JOGLAppletLauncher" />

<param name="archive" value="p5/@@theClass@@.jar,opengl.jar,jogl.jar,gluegen-rt.jar,extraLib.jar,core.jar" />

<param name="mayscript" value="true" />
<param name="scriptable" value="true" />
<param name="image" value="loading.gif" />
<param name="boxmessage" value="Loading Processing software..." />
<param name="boxbgcolor" value="#FFFFFF" />
<param name="progressbar" value="true" />
<param name="subapplet.classname" value="p5.@@theClass@@" />
<param name="subapplet.displayname" value="@@theClass@@" />
<param name="test_string" value="inner" />
...
Re: Java Security Popups
Reply #1 - May 5th, 2009, 6:55am
 
This is finally the script I'm using to sign a large set of jars. I'm not sure if it is the best way to do it, but it seems to reduce applets security prompts. Java Security and signature remains a mystery for me.

Code:
echo -------------------------[SIGN ALL JAR]
echo $uperPa$$word > sign.pass

keytool -genkey -keystore myKey.jks -alias userName < sign.pass
keytool -selfcert -keystore myKey.jks -alias userName < sign.pass

for file in `find ./ -name '*.jar'` ; do
jarsigner -keystore myKey.jks $file userName < sign.pass
done
echo -------------------------[SIGNED]
Re: Java Security Popups
Reply #2 - May 5th, 2009, 1:43pm
 
You shouldn't need to do any signing to use OpenGL in applets. The OpenGL jar files are pre-signed by Sun and their certificate should only need accepting once.

If you're doing something yourself that needs security clearance, then I think you need to sign your .jar only.. but maybe also core.jar. That'll leave you with 2 certificates to accept.
Re: Java Security Popups
Reply #3 - May 10th, 2009, 10:16am
 
Thank you John.

I use JAVAC to compile sketches. Then I only need to sign my own stuff, core.jar and opengl.jar as well, right? And my own libraries.

For webapplet, I came on a "param cache_archive" which was not in the P5 template. It seems to be more fluent when I turn on cache for webapplets. Here is an example of the extra jogl launch tags:

Code:
<param name="subapplet.image" value="loading.gif" />	
<param name="cache_archive" VALUE="opengl.jar,jogl.jar,gluegen-rt.jar,anar.jar,core.jar">
<param name="cache_archive_ex" VALUE="opengl.jar;preload,jogl.jar;preload,gluegen-rt.jar;preload,anar.jar;preload,core.jar;preload,p5/@@theClass@@/@@theClass@@.jar;preload">


I'm not able to trace if the jars are redownloaded each time or the browser is using cached jars, reducing downloading times.

Anyway, it's working now and is fast, at least in my browsers.

http://ANAR.ch/examples
Page Index Toggle Pages: 1