Applet Signing problem with singletons

Hi, I can sign my applets now and they work when I make small, 1 class programs. But when I make try to sign big applications or ones with Singleton classes it doesnt work. Does anyone know why?

suggest using ‘ant’ to compile the jars, and then signing the whole jar. Never had any problems with it.

thanks for the reply

I’m using Eclipse 3.4.1
Is the default jar builder ant? or do i have to change the exporter somehow / download a plugin?

I haven’t actually signed any eclipse built jars directly,
antenna is really meant for J2ME but it’s handy to
create alternative builds.
http://antenna.sourceforge.net/

Here’s an example of how I work with it, but I think some
feedback from people who sign jars straight off eclipse would be welcome also.

(ForceDel is a hack to delete the old junk from underneath, could be done cleaner)


<project name="Build jars" default="build_jar_applet" basedir=".">
<property name="output_dir" value="jars"/>
<property name="output_jar_udpclient" value="jars/udpclient.jar"/>
<property name="output_jar_udpserver" value="jars/udpserver.jar"/>

<target name="build_jar_udpclient">
	<mkdir dir="${output_dir}"/>
	<exec executable="utils/ForceDel.exe">
		<arg line="${output_jar_udpclient}"/>
	</exec>
	<jar jarfile="${output_jar_udpclient}">
	 	<fileset dir="bin/" includes="**/*.class"/>
		<fileset dir="../archon_common/bin/" includes="**/*.class"/>
	</jar>
	<signjar jar="${output_jar_udpclient}" alias="archon" storepass="secret" keystore="archon.keystore"/>
</target>

<target name="build_jar_udpserver">
	<mkdir dir="${output_dir}"/>
	<exec executable="utils/ForceDel.exe">
		<arg line="${output_jar_udpserver}"/>
	</exec>
	<jar jarfile="${output_jar_udpserver}">
	 	<fileset dir="bin/" includes="**/*.class"/>
		<fileset dir="../archon_common/bin/" includes="**/*.class"/>
	</jar>
	<signjar jar="${output_jar_udpserver}" alias="archon" storepass="secret" keystore="archon.keystore"/>
</target>

<target name="gen_keys">
	<genkey alias="archon" storepass="secret" keystore="archon.keystore">
		<dname>
		    <param name="CN" value="SNS Company Ltd."/>
		    <param name="OU" value=""/>
		    <param name="O"  value="slicksandslide.com"/>
		    <param name="C"  value="FI"/>
		  </dname>
	</genkey>
</target>
	
</project>

presume you’ve read http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html
Can you give more clues, error messages etc?
Maybe make a tiny test with 2 classes. I don’t remember a static class being forbidden explicitly…