signed Applet don't run, but with appletviewer it work

[nobr]Hi,

first sorry but i don't undersand wery well English. I understand German !

I've implement a Applet who open a Comm Port.

i've my signed my Applet and create a Policy-File, but wenn I start that Applet with a Browser it don't open a Comm Port. And wenn I start it with a appletviewer, it open a Comm Port.

What I have to do, whit a Browser to open that serial Comm Port?

There are my Steps to sign my Applet. What is missing to work that Applet?

1. keytool -genkey -alias myAlias -keystore myStore -keypass XXX -dname"cn=XXX" -storepass XXX

2. keytool -export -keystore myStore -storepass XXX -alias myAlias -file Cer.cer

3. keytool -import -alias myNewAlias -file Cer.cer -keystore myNewStore -storepass XXX

4. Signiere Applet mit JBuilder

Keystore: C:/Download/Bobi/SigniertesApplet/myStore

Storepass: XXX

Alias: myAlias

Alias Password: XXX

Create Jar:

5. Erstelle eine neue Datei:"company.policy"

keystore"myNewStore";

grant signedBy"myNewAlias"{

permission java.security.AllPermission;

};

grant{

permission java.security.AllPermission;

};

6. Ersteller Batch-File: runApplet.bat

path C:\Programme\Borland\JBuilder2005\jdk1.4\bin

appletviewer -J-Djava.security.policy=company.policy Applet1.html

7.

<html>

<head>

<title>

HTML Test Page

</title>

</head>

<body>

Applet.Welafiapplet will appear below in a Java enabled browser.<br>

<applet

codebase ="."

archive ="Applet1.jar"

code="bobi.Applet1.class"

name="TestApplet"

width="700"

height="700"

hspace="0"

vspace="0"

align="middle"

>

</applet>

</body>

</html>

8. starte runApplet.bat

[/nobr]

[2418 byte] By [BobiBoa] at [2007-10-1 23:44:16]
# 1

http://forum.java.sun.com/thread.jspa?threadID=663056&tstart=0

http://forum.java.sun.com/thread.jspa?threadID=663057&tstart=0

1. Do not double post.

2. Do not double post.

3. Do not double post.

4. Do not double post.

5. Do not double post.

6. Do not double post.

7. Do not double post.

8. Do not double post.

9. Do not double post.

10. Do not double post.

11. Do not double post.

12. Do not double post.

13. Do not double post.

14. Do not double post.

15. Do not double post.

16. Do not double post.

17. Do not double post.

18. Do not double post.

19. Do not double post.

20. Do not double post.

21. Do not use the applet tag, try the htmlconverter.exe in the jdk/bin directory.

22. Did you sign correctly?

You do not need a signedby policy, a signed applet will ask the user the "do you trust"

question.

If you want to use the signedby you need to add the policy file you created in your java.security.

Signing applets:

http://forum.java.sun.com/thread.jsp?forum=63&thread=524815

second post and last post for the java class file using doprivileged

http://forum.java.sun.com/thread.jsp?forum=63&thread=409341

4th post explaining how to set up your own policy with your own keystore

Still problems?

A Full trace might help us out:

http://forum.java.sun.com/thread.jspa?threadID=656028

(if the next response is without a trace I will ignore it)

harmmeijera at 2007-7-15 15:34:55 > top of Java-index,Security,Signed Applets...