What are the steps to sign an applet
I've been searching and reading for weeks now and just recently I though I had it... I put my Uploader tool online, and the "grant yes/no" came up!! I was excited, and then the applet showed up. This was the farthest i'd gotten thus far, and then... it didn't pop up the JFileChoser. It failed yet again.
I've searched all over the internet for a way to sign your own applet for free. It doesn't need to be trusted, so long as the applet works by just granting permision.
If you know the steps to signing an applet, then please post them here. Make them easy to follow, with little on the details of how it works.
And don't stop at just signing the applet.. keep going until the signed applet is uploaded onto a test server. That, I think, is where a lot of people get confused.
Nobody has yet done this that i've seen (writen a tutorial) and i've been searching fo weeks!
Greatly appreciated by myself, and thousands to come.
[973 byte] By [
mynameisa] at [2007-10-2 4:22:46]

I have a signed jar file and a html file on my desktop. I'm loading this jar file localy for testing, and the "grant permision [y/n]" pops up.
The button also pops up. however the JFileChooser does not.
The jar has been self-signed, and verified using jarsigner -verify Uploader.jar.
my end pupose is to allow Multi File Uploading on my site.
I just want my users to accept my applet, and allow my applet to have read permissions enabled.
I'm not sure if i need a policy file, and if so, where to put that? in the jar? in the same directory? or do I tell the Html file to link to where the policy file is.
I don't want my users to have to do anything but accept my applet.
below is my java code for the uploader.. I thought maybe I need to request permission there too.
And below that is the html file located on the desktop that loads my applet... incase i need to put code in that too.. like a link to a policy file?
JavaCode..
/* This Applet will allow the user to upload multiple files at a time
*/
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.io.File;
import java.util.jar.*;
import javax.swing.JFileChooser;
import javax.swing.SwingUtilities;
public class Uploader extends Applet implements ActionListener
{
Button addFiles;
Color bgColor;
public void init()
{
//this gets parameters from HTML to set the bgColor
int r = Integer.parseInt(getParameter("r"), 16);
int g = Integer.parseInt(getParameter("g"), 16);
int b = Integer.parseInt(getParameter("b"), 16);
//set bgColor
bgColor = new Color(r,g,b);
//change Background color to bgColor
setBackground(bgColor);
setLayout(new FlowLayout());
addFiles = new Button("Add Files");
//check if user wants to add files..
addFiles.addActionListener(this);
add(addFiles);
}
public void actionPerformed(ActionEvent e) {
//If the upload button was checked.. upload files..
if (e.getSource() == addFiles){
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFileChooser fileChooser
= new JFileChooser(".");
fileChooser.setMultiSelectionEnabled(true);
int status = fileChooser.showOpenDialog(null);
if (status == JFileChooser.APPROVE_OPTION) {
File selectedFiles[] =
fileChooser.getSelectedFiles();
for (int i=0,
n=selectedFiles.length; i<n; i++) {
System.out.println("Selected: "
+ selectedFiles[i].getParent()
+ " "
+ selectedFiles[i].getName());
}
}
}
});
}
}
}
HTML
><!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.51 [nl] (Win98; I) [Netscape]">
<meta name="Author" content="Bavo Bruylandt (RealApplets.com)">
<meta name="Description" content="Upload Multiple files at once.">
<meta name="KeyWords" content="Java applet that uploads multiple files at once"><title>Upload-Multi - Applet</title></head>
<body>
<center>
<applet code="Uploader.class" archive="Uploader.jar" height="30" width="100">
<param name="r" value="de">
<param name="g" value="ad">
<param name="b" value="00">
</applet>
</center>
</body></html>