Sign Applet to write on LPT1 port - permission error

Hi,
I have this simple applet
import java.awt.*;
import java.applet.*;
import java.util.*;
import java.io.*;
public class TestJavaXp extends Applet{
     public void putJavaArray(String arrayAsAString) {
     int i = 0;
     String s = "Stampa questo testo";
         try {
          FileWriter out = new FileWriter("LPT1");
          out.write(s);     
          out.flush();
          out.close();     
         catch (IOException e) {
          e.printStackTrace();
}I signed the applet but I receive this error:
uncaught exception: Error calling method on NPObject!
*[plugin exception: java.security.AccessControlException: access denied (java.ioFilePermission LPT1 write)]*
It works perfectly only if I grant permissions in the java.policies file.
Why?
I've no problem signing applets that write files on disk, I've troubles only with LPT1 port but I need it.
I tried different browsers.
Can anyone help me?
Thanks.

New foundings!
As the server is running Netware 4.2, is that possible if i just install JVM on the server and problem will be solved?
J.

Similar Messages

  • User unable to sign document with epad after extending features (Permission Error)

    Here's my situation;
    I've provided a form for a user that has an epad to sign the document, the pdf itself has had text and signature fields added in LiveCycle, and within Acrobat Pro 9 the features have been extended. The user is still receiving the following; "The security settings on this document prevent adding text and/or placing a signature on it from Adobe Reader. To fill and sign this document you need to print it out."
    What have I missed? From what I've understood in researching this, extending the features in Acrobat Pro should be enough to allow a user in Reader to sign the document.
    Can provide file if need be.
    Thanks

    Your user should go to Extended pane in Reader to apply a digital signature to the Reader extended PDF.
    The user is probably trying to use the Sign pane in Reader which has some options disabled according to the document permissions. The new Sign pane in Reader is an integration with Adobe EchoSign service in the sense that it enables an end user to fill-up documents, electronically sign and then send a PDF document, without having the need to print them. The Sign pane provides two options to the user:
    1 - Fill and Sign: Here the user can place text using 'Add Text'. Users can add arbitrary text to a PDF, eg. in documents where Reader cannot interact with the document even though the document looks like a form, in forms where user cannot save the filled-up form. In such cases the only option a user has is to print the form, fill it and then fax or fedex the filled up document to the author or scan it and send it electronically. Using the Sign pane in Reader, a user can add text and also electronically sign the document (this is not the same as digital signature) using an image of their signature. He can create a 'signature' from a scanned paper which has user's handwritten signature and place it on the PDF.
    2 - Send for Signature: Here the user is sent to EchoSign for collecting signatures from others.
    Hope that helps.

  • Signed applet crashes

    Hello all!
    Has ever happened to someone that when using a signed applet, the browser crashes without giving an error or something?
    I made an applet that had to read a file on the server, then signed it, and when trying it, after the browser asked me if to trust the signature, all freezed and nothing else happened...
    I am developing an applet with NetBeans, the code in question is this:
    import java.io.*;*
    *import java.util.*;
    public class PhotoAlbum extends javax.swing.JApplet {
        /** Initializes the applet PhotoAlbum */
        public void init()
            try
                java.awt.EventQueue.invokeAndWait(new Runnable() {
                    public void run() {
                        initComponents();
            } catch (Exception ex)
                ex.printStackTrace();
        public void start()
            try
                initAlbum();
            catch (Exception e)
                error.setText(e.getLocalizedMessage()); //"error" is a textbox. I use that to write the exceptions caught runtime.
        private void initAlbum() throws Exception
          FileReader reader = new FileReader("/Foto/PhotoDB");
    @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            modLista = new javax.swing.DefaultListModel();
            jScrollPane1 = new javax.swing.JScrollPane();
            listaAlbum = new javax.swing.JList();
            jScrollPane2 = new javax.swing.JScrollPane();
            error = new javax.swing.JTextArea();
            jLabel1 = new javax.swing.JLabel();
            listaAlbum.setModel(modLista);
            listaAlbum.setVisibleRowCount(4);
            jScrollPane1.setViewportView(listaAlbum);
            error.setColumns(20);
            error.setRows(5);
            jScrollPane2.setViewportView(error);
            jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Foto/bell_urlo.png"))); // NOI18N
            jLabel1.setText("jLabel1");
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 547, Short.MAX_VALUE)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 523, Short.MAX_VALUE)
                    .addContainerGap())
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(117, Short.MAX_VALUE)
                    .addComponent(jLabel1)
                    .addGap(72, 72, 72))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel1)
                    .addGap(12, 12, 12)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        }// </editor-fold>
        // Variables declaration - do not modify
        private javax.swing.JTextArea error;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JScrollPane jScrollPane2;
        private javax.swing.JList listaAlbum;
        private javax.swing.DefaultListModel modLista;
        // End of variables declaration
        public Album[] collection;
        public Album current;
        public int photoIndex;
    }This is the basic code, I deleted all the instructions, leaving the one from where the error started (the filereader declaration)
    I don't have any idea on why the browser crashes...
    When the applet is unsigned, on the textbox is shown correctly the error "permission denied".
    On other files the signing procedure goes ok, since I tried it on a program I found on the internet @ http://www.captain.at/programming/java/
    Edited by: DrZoidberg on Sep 15, 2008 9:15 AM

    are you using IE?
    i use mozilla and this is what i see when i trust the certificate.
    java.lang.SecurityException: class "PhotoAlbum$1"'s signer information does not match signer information of other classes in the same package
    at java.lang.ClassLoader.checkCerts(Unknown Source)
    at java.lang.ClassLoader.preDefineClass(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at PhotoAlbum.init(PhotoAlbum.java:21)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
    at PhotoAlbum.start(PhotoAlbum.java:40)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    might help you :)

  • Signed Applet problems in Vista + JMF

    Hi All,
    I'm new to Java Applet programming. I wrote an application which works as a VoIP Client in a webpage (Using JMF). Its working very fine in allmost all Windows XP machines.
    But not in Windows Vista machines. In Vista i'm getting the following error :
    "No permission to capture from applet" - Since its a Signed applet. The application is digitally signed from a CA. Even though its not working in Vista (IE and Mozilla Firefox also).
    I have went through the following link which says IE in Vista will run on protected mode, so Signed Applet will not have all the permission eventhough its signed for "AllPermission".
    ----- http://java.sun.com/javase/6/webnotes/install/system-configurations.html
    And also I'm not able to create a customized jar file for JMF using JMF Customizer. (JMF Customizer is an application which creates a jar file with specified classes). While creating a jar file I'm getting particular class is not available. (In Windows XP, this class is compilled at run time).
    Please let me know the following things,
    a) Is there any security settings i have to make to run Signed Applet in Windows Vista ?
    b) What is Java Policy file? I don't have any policy file - will it affect the application ?
    c) Do I need to sign each applet (say i have 5 applets in single jar file) ?
    d) In Vista how Mozilla Firefox are running (like IE7's restricted environment or XP compatiable mode) ?
    Thanks in Advance,
    Karthikeyan R

    I have exatly the same problem but not with the class itself. I have the problem with an jar that my class calls.
    I use jdk1.4.2. I think it's basicaly the same problem as "lfpgMW".
    I'll also whould like an idea...
    thanks

  • Capture and RTP on a SIGNED applet.

    I am trying to build an applet that allows users to chat both ways. I want the user to install nothing (other than java) and i provide the libraries they need (including jmf). I have signed the applet to ease my troubles, but it seems they are still there. The basic goal: capture audio from two microphones, send the audio via RTP, hear audio on both sides.
    Even though I have a signed applet with all permissions, I lack permission to capture from applets? Aside from the fact that this seems absurd, it's frustrating. I am looking to find a way around this. I don't want the users to have to manually change the JMFRegistry or download a program to it.
    The better options :
    1) Is there a way to take advantage of the signed applet to alter the permissions in the program? (Seems very unlikely, but it would be the best).
    2) Is there a way to provide the permissions in the jmf.jar (including jmf.properties?) that I include? (Seems more unlikely than 1)
    3) What makes this more interesting (frustrating), I can use the Java Sound API to access the microphone and open an AudioInputStream. Can I plug this stream, or some other object from javasound, into the JMF somehow to send it via RTP?
    4) Other options?

    I found a way to use javasound instead of the jmf for the source audio (that's number 3 in my original post). So, i'm good for my problem.
    If you want to do mixing, javasound should have more support for mixing (though I've not done it). Check out this thread, it was very useful for me.
    http://forum.java.sun.com/thread.jspa?threadID=680525&start=0&tstart=0
    I might have spoken too soon... I am just getting static - but that might be related to audio formats.....
    Message was edited by:
    mortserg

  • Signed Applet and Threads

    I have a signed applet that writes some files to the client's local disk. I modified the applet to spawn the file writing into a separate thread. The thread that the signed applet spawns, however, seems to not retain the security rights that my signed applet has, even though the thread is spawned by the signed applet! I receive access restriction exceptions when I write the files with the second thread, but receive no such exception when doing the same thing in the original signed applet code. Is this how the security model is supposed to work?

    Do you have really problems with files? or with threads... Maybe it would be enough just to allow the threads permisions...

  • Write file with signed applet

    Hi!
    I have a signed applet which has to write a file to the server, but i still get permission exceptions. I guess I still have to add permissions to the applet but I realy can't find how to do that. Can anyone give me a short tutorial on how to add permissions to the applet?
    greetings

    As stated, applets are only able to write files in the machine that the applet is running on. They can't write files to other machines. They can communicate to the machine that they originate from (its host) - but not other, random machines.
    To place a file on its host, the applet sends the file contents to its host (typically using sockets for this) which receives the data with a server program. Then another program on the host writes the data to a file. If you want the file on another, random machine then it can be transferred using the same approach (sockets, etc.)
    There are alternatives, but this is the least complicated approach. This tutorial walks you through creating an applet and the host it communicates with.
    [http://java.sun.com/docs/books/tutorial/deployment/applet/server.html]
    Note that the tutorial also has a link to a more detailed tutorial, the Custom Networking Trail.

  • Signed Applet and no permission

    Hi,
    we have an applet which writes a file on the local disc. Therefore this applet is signed with a valid verisign certificate. Everything works perfect, as long we use the vm 1.4.2_08. Now we changed the vm to 1.4.2_10 and writing a file is no more possible.
    I never used a policy file, because we have a proper signed applet. I found many articles, which all say that if you have a signed applet a modification of security files is not neccessary.
    If I modify the java.policy and add these lines:
    permission java.awt.AWTPermission "readDisplayPixels";
    permission java.awt.AWTPermission "createRobot";
    permission java.io.FilePermission "${user.home}/screenshot.jpg", "read,write,delete";
    everything works ok. But our applet runs on more than 40.000 clients. I am not willing to modify all clients. There must be another solution.
    Any hint is appreciated.
    I have checked some more vm. The problem occurs also with the vm 1.4.2_04.
    thx thorsti
    Message was edited by:
    thorsti16

    Try to use doPrivileged or do the "privileged" action in a thread started
    in run.
    Is the jre asking the user the "do you trust question"? If not someone might
    have switched off trusting signed applets in the java.policy (like a profesional
    company where backoffice has a say in what to trust, not the user).
    Signing applets:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post and reply 18 for the java class file using doprivileged
    A Full trace might help us out:
    http://forum.java.sun.com/thread.jspa?threadID=656028

  • Adobe PDF Writer (v5.0) won't install; can't find LPT1 port

    I've searched extensively for an answer on this question, and the most common answer is no answer or use a newer PDF creator.
    The department I support uses database software that was never programmed to support any PDF creator past PDF Writer, so all users of this software have Acrobat Professional 5.0.5 installed using the "Custom" option to include the PDF Writer.
    All workstations run XP, sp3.  I have never seen this problem on any other machine.  I have installed version 5 on other machines with newer installations of Acrobat (7,8, and 9) with no functionality issues.  The machine that won't install the PDF Writer had V8 installed.  I have removed Acrobat V8 to try to get the V5 installation to run.  I have tried running the V5 installation first without PDF Writer, and then adding in the PDF Writer.
    In all cases, as soon as you click "Install" after checking "PDF Writer", the error "Acrobat PDF Writer requires a LPT1: printer port.  Setup could not find this required port.  The PDF Writer component will not be installed.  To install PDF Writer, add a LPT1: port and run setup again" always appears, and the installation tries to continue without the PDF Writer.
    This computer has a fully-functioning LPT1 port (as well as LPT2 and LPT3) which is not in use by any other printers (according to the printer properties display).  XP shows the port under Device Manager as functioning properly, although I have both disabled/re-enabled the port, as well as uninstalling it and rebooting, at which point it re-installs properly.
    All high-priority Windows XP updates are current and again, on similar machines, similarly imaged, I have never had this problem using the same media.  I have tried installing a printer on this port and adding drivers.  All machine users have Administrator privileges (unfortunately)
    Due to the large quantity of data and software on this user's machine (and the fact that otherwise it runs great), I would REALLY rather not re-image the machine.
    Any help or ideas will be GREATLY appreciated.

    Hey, good idea, and I hadn't done it, but nothing is remaining from any previous Acrobat installs (according to the Cleanup Utility).  I do pretty good registry cleanup on these machines as I work on them for other reasons/updates.
    Other ideas?

  • Grant permission for a signed applet

    I have my jar file signed. Now, I hate to have the user to modify their .java.policy file, beside, I did not have my certificate verified by Verisign. Is there any other way to do it? I have read some posts which the user of the signed applet will see a pop up dialog while loading the signed applet, if they click on "grant all access", then the applet will have all the permission. Can anyone tell me how to do that?
    Thanks
    Andy

    nicoleman1 put together a "tutorial" on signing your applet (jar). The instructions will work for all browsers that support the Java Plugin.
    Here is a link to the thread:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=174214
    Pete

  • Why my self-signed applet could not read local disk but could write?

    I used a self-signed certificate for the applet yesterday and it worked
    fine at the beginning time, that is, it could write/read file to/from
    local disk, and it could connect to other MDS servers. But later, a
    problem happens. It could write file to local disk(I tested it and created
    files to C:/ under windows) but when it try to read that file, it got a
    io acessing exception. It could connect to other servers. I am puzzled
    about this problem, and I wonder why I could write but could not
    read. Need I deal with any policy file issue here?

    hi,
    i 'am doing something which is similar to the stuff ur doing .I wanted to write into file on the local disk on which the applet is running.for this i have signed the applet .do i need to make it self signed wat is difference between the self signed and signed applet .The problem which i facing is that it still gives me the security exception even if i define the policy file for that applet............Can u help me reagrding this
    Thanks in advance
    your great help would be apprecriated
    rao_lavs

  • OC4J 10.1.3.2 oc4jclient.jar makes permission problems in signed applets

    A signed applet on WINDOWS 2000 with JRE 1.5_10 or 1.5_12 plugin in a IE6 browser, which talks to Session beans on a SUN 5.9 OC4J 10.1.3.2 server has no permissions with this library :
    example:
    at XXX.initContext(BeanFactory.java:69)... // 69: context = new InitialContext(props);
    Exception in thread "AWT-EventQueue-2" java.lang.ExceptionInInitializerError
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission oracle.j2ee.logging.severe read)
    at java.security.AccessControlContext.checkPermission(Unknown Source)...
    With the older OC4J 10.1.3 oc4jclient.jar there is no problem !
    Therefore I use the older oc4jclient.jar in my applet.

    Seems to be a bug. That was the response from Oracle support (Metalink)
    Response:
    Your issue seems to be related to bug 5594702 - Abstract: EJB30 ENTITY BEAN WITH @ID AND @COLUMN ANNOTATION FAILS TO DEPLOY ON AIX.
    There is an issue with the IBM JDK/JRE 1.5's processing of annotations.
    Links:
    http://www.theserverside.com/discussions/thread.tss?thread_id=37764
    http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=367&thread=112543&cat=10
    When processing annotations it returns boolean values as false.
    Work-around:
    Fully specify the @Column annotation's boolean values. If insertable and updatable are set to false (which will happen due to this bug) then TopLink sets the PK
    mapping to read-only and the exception seen is expected.
    Note: nullable attribute of the @Colmun is not used in the EJB3/JPA preview of 10.1.3.0 If the customer MUST override the default column name then they should use:
    @Column(name="column-name", insertable=true, updatable=true)
    If they do not wish to override the default column name then simply do not use an @Column annotation.
    It can be deleted or commented out in the JDev generated code.
    There are two reported annotation processing issues with the AIX JVM. One was fixed in SR1 and the other is fixed
    in SR3 (due out Oc 11 - today). Upgrading to these more recent JVM releases may also address this issue.
    RECOMMENDED SOLUTIONS:
    1. Upgrade the IBM AIX JVM to SR3.
    OR
    2. Fix all generated @Column annotations as described above

  • Restriction for signed applet

    Hi all,
    i signed applet which is trying to modify file tmp.txt on client machine. Is there any opportunity for client to forbid this action for signed applet?
    I tried use policy file but i was unlucky. It is ok for unsigned applet but what about signed one?
    Thank you for your response.
    benky

    you need to install the jre, and place the win32.dll at JavaSoft\JRE\1.3.1_06\bin, that properties file place at JavaSoft\JRE\1.3.1_06\lib, comm.jar at JavaSoft\JRE\1.3.1_06\lib\ext\
    and in ur code try to use it to open ur com port
    public String test() {
    String drivername = "com.sun.comm.Win32Driver";
    try
    CommDriver driver = (CommDriver) Class.forName(drivername).newInstance(); driver.initialize();
    catch (Throwable th)
    {* Discard it */}
    drivername = "javax.comm.*";
    try
    CommDriver driver = (CommDriver) Class.forName(drivername).newInstance(); driver.initialize();
    catch (Throwable th)
    {* Discard it */}
    portList = CommPortIdentifier.getPortIdentifiers();
    while (portList.hasMoreElements()) {
    portId = (CommPortIdentifier) portList.nextElement();
    if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
    if (portId.getName().equals("COM2")) {
    //if (portId.getName().equals("/dev/term/a")) {
    try {
    serialPort = (SerialPort)
    portId.open("SimpleWriteApp", 2000);
    } catch (PortInUseException e) {}
    try {
    outputStream = serialPort.getOutputStream();
    } catch (IOException e) {}
    try {
    serialPort.setSerialPortParams(9600,
    SerialPort.DATABITS_8,
    SerialPort.STOPBITS_1,
    SerialPort.PARITY_NONE);
    } catch (UnsupportedCommOperationException e) {}
    int i=0;
    while(true)
    try {
    messageString="hi";
    System.out.println(i++);
    outputStream.write(messageString.getBytes());
    } catch (IOException e)
    System.out.println(e);
    messageString=String.valueOf(e);
    return messageString;
    and yet u need to signed the applet
    1. Compile the applet
    2. Create a JAR file
    3. Generate Keys
    4. Sign the JAR file
    5. Export the Public Key Certificate
    6. Import the Certificate as a Trusted Certificate
    7. Create the policy file
    8. Run the applet
    Susan
    Susan bundles the applet executable in a JAR file, signs the JAR file, and exports the public key certificate.
    1. Compile the Applet
    In her working directory, Susan uses the javac command to compile the SignedAppletDemo.java class. The output from the javac command is the SignedAppletDemo.class.
    javac SignedAppletDemo.java
    2. Make a JAR File
    Susan then makes the compiled SignedAppletDemo.class file into a JAR file. The -cvf option to the jar command creates a new archive (c), using verbose mode (v), and specifies the archive file name (f). The archive file name is SignedApplet.jar.
    jar cvf SignedApplet.jar SignedAppletDemo.class
    3. Generate Keys
    Susan creates a keystore database named susanstore that has an entry for a newly generated public and private key pair with the public key in a certificate. A JAR file is signed with the private key of the creator of the JAR file and the signature is verified by the recipient of the JAR file with the public key in the pair. The certificate is a statement from the owner of the private key that the public key in the pair has a particular value so the person using the public key can be assured the public key is authentic. Public and private keys must already exist in the keystore database before jarsigner can be used to sign or verify the signature on a JAR file.
    In her working directory, Susan creates a keystore database and generates the keys:
    keytool -genkey -alias signFiles -keystore susanstore -keypass kpi135 -dname "cn=jones" -storepass ab987c
    This keytool -genkey command invocation generates a key pair that is identified by the alias signFiles. Subsequent keytool command invocations use this alias and the key password (-keypass kpi135) to access the private key in the generated pair.
    The generated key pair is stored in a keystore database called susanstore (-keystore susanstore) in the current directory, and accessed with the susanstore password (-storepass ab987c).
    The -dname "cn=jones" option specifies an X.500 Distinguished Name with a commonName (cn) value. X.500 Distinguished Names identify entities for X.509 certificates.
    You can view all keytool options and parameters by typing:
    keytool -help
    4. Sign the JAR File
    JAR Signer is a command line tool for signing and verifying the signature on JAR files. In her working directory, Susan uses jarsigner to make a signed copy of the SignedApplet.jar file.
    jarsigner -keystore susanstore -storepass ab987c -keypass kpi135 -signedjar SSignedApplet.jar SignedApplet.jar signFiles
    The -storepass ab987c and -keystore susanstore options specify the keystore database and password where the private key for signing the JAR file is stored. The -keypass kpi135 option is the password to the private key, SSignedApplet.jar is the name of the signed JAR file, and signFiles is the alias to the private key. jarsigner extracts the certificate from the keystore whose entry is signFiles and attaches it to the generated signature of the signed JAR file.
    5. Export the Public Key Certificate
    The public key certificate is sent with the JAR file to the whoever is going to use the applet. That person uses the certificate to authenticate the signature on the JAR file. To send a certificate, you have to first export it.
    The -storepass ab987c and -keystore susanstore options specify the keystore database and password where the private key for signing the JAR file is stored. The -keypass kpi135 option is the password to the private key, SSignedApplet.jar is the name of the signed JAR file, and signFiles is the alias to the private key. jarsigner extracts the certificate from the keystore whose entry is signFiles and attaches it to the generated signature of the signed JAR file.
    5: Export the Public Key Certificate
    The public key certificate is sent with the JAR file to the whoever is going to use the applet. That person uses the certificate to authenticate the signature on the JAR file. To send a certificate, you have to first export it.
    In her working directory, Susan uses keytool to copy the certificate from susanstore to a file named SusanJones.cer as follows:
    keytool -export -keystore susanstore -storepass ab987c -alias signFiles -file SusanJones.cer
    Ray
    Ray receives the JAR file from Susan, imports the certificate, creates a policy file granting the applet access, and runs the applet.
    6. Import Certificate as a Trusted Certificate
    Ray has received SSignedApplet.jar and SusanJones.cer from Susan. He puts them in his home directory. Ray must now create a keystore database (raystore) and import the certificate into it. Ray uses keytool in his home directory /home/ray to import the certificate:
    keytool -import -alias susan -file SusanJones.cer -keystore raystore -storepass abcdefgh
    7. Create the Policy File
    The policy file grants the SSignedApplet.jar file signed by the alias susan permission to create newfile (and no other file) in the user's home directory.
    Ray creates the policy file in his home directory using either policytool or an ASCII editor.
    keystore "/home/ray/raystore";
    // A sample policy file that lets a JavaTM program
    // create newfile in user's home directory
    // Satya N Dodda
    grant SignedBy "susan"
    permission java.security.AllPermission;
    8. Run the Applet in Applet Viewer
    Applet Viewer connects to the HTML documents and resources specified in the call to appletviewer, and displays the applet in its own window. To run the example, Ray copies the signed JAR file and HTML file to /home/aURL/public_html and invokes Applet viewer from his home directory as follows:
    Html code :
    </body>
    </html>
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="600" height="400" align="middle"
    codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,1,2">
    <PARAM NAME="code" VALUE="SignedAppletDemo.class">
    <PARAM NAME="archive" VALUE="SSignedApplet.jar">
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
    </OBJECT>
    </body>
    </html>
    appletviewer -J-Djava.security.policy=Write.jp
    http://aURL.com/SignedApplet.html
    Note: Type everything on one line and put a space after Write.jp
    The -J-Djava.security.policy=Write.jp option tells Applet Viewer to run the applet referenced in the SignedApplet.html file with the Write.jp policy file.
    Note: The Policy file can be stored on a server and specified in the appletviewer invocation as a URL.
    9. Run the Applet in Browser
    Download JRE 1.3 from Javasoft
    good luck! [email protected]
    i already give u many tips, i use 2 weeks to try this to success, hopw that u understand that, a result of success is not important, the process of how to get things done is most usefull!

  • How to resolve problems in policy file of signed Applet

    Hi to All,
    I want to connect the web site through my Signed Applet which is working as a Proxy server. but i m facing certain problems in my policy file:
    this is my policy file :-
    grant {
    permission java.security.AllPermission "", "";
    permission java.net.SocketPermission "http://www.google.com:4321", "connect, accept,resolve";
    permission java.security.UnresolvedPermission;
    n i got such type of exceptions n my Applet prompt applet not initialized.
    Got connection Socket[addr=/192.168.1.232,port=1200,localport=4321]
    Reading request...
    URI is: http://www.google.com/
    Host to contact is: www.google.com at port 80
    Got request...
    java.security.AccessControlException: access denied (java.net.SocketPermission www.google.com resolve)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
    at java.security.AccessController.checkPermission(AccessController.java:427)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at java.lang.SecurityManager.checkConnect(SecurityManager.java:1031)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1117)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1098)
    at java.net.InetAddress.getAllByName(InetAddress.java:1061)
    at java.net.InetAddress.getByName(InetAddress.java:958)
    at java.net.InetSocketAddress.<init>(InetSocketAddress.java:124)
    at java.net.Socket.<init>(Socket.java:179)
    at ProxyApplet.handle(ProxyApplet.java:75)
    at ProxyApplet.<init>(ProxyApplet.java:132)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:721)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:650)
    at sun.applet.AppletPanel.run(AppletPanel.java:324)
    at java.lang.Thread.run(Thread.java:595)
    here 4321 is Port no. which i've as a random port no.
    plz Help
    thnx in advance
    with regards
    pank_naini

    Please, if you can't help me, could you tell me who can I contact ?

  • Bug: Java applet cannot print, even with print permission granted.

    I was not able to file this bug report at the official Apple bug report site, so...
    Summary:
    When a java applet initiates a print job, the user is (correctly) presented with a dialog requesting permission for printing. Once permission is granted, the printing subsystem attempts to communicate with CUPS at localhost:631, and permission is denied. To the naive user, it appears that the applet is broken.
    Steps to Reproduce:
    Go to
    http://www.wordle.net/gallery/wrdl/921427/WordleCore_SourceCode
    Once the applet has loaded, click the button labelled "Print...".
    Expected Results:
    After permitting printing, the user should see the print dialog, and printing should proceed as normal.
    Actual Results:
    Here is the relevant section of the stack trace generated when this happens:
    <pre>java.security.AccessControlException: access denied
    (java.net.SocketPermission localhost:631 connect,resolve)
    at java.security.AccessControlContext.checkPermission
    (AccessControlContext.java:264)
    at java.security.AccessController.checkPermission
    (AccessController.java:427)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:
    532)
    at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:521)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
    at sun.net.www.http.HttpClient.New(HttpClient.java:304)
    at sun.net.www.http.HttpClient.New(HttpClient.java:321)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient
    (HttpURLConnection.java:813)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect
    (HttpURLConnection.java:765)
    at sun.net.www.protocol.http.HttpURLConnection.connect
    (HttpURLConnection.java:690)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream
    (HttpURLConnection.java:857)
    at sun.print.IPPPrintService.opGetAttributes(IPPPrintService.java:
    1419) </pre>
    Regression:
    This problem was introduced only with the most recent Java update.
    Notes:
    There is no workaround for the applet author, other than to use a signed applet, which is prohibitively expensive, and which should not be required for printing, anyway. It's difficult to instruct the user in how to grant the appropriate permissions via policy files, since the finder will not allow a user to create a file named ".java.policy" in their home directory, and since the system policy file is write-protected.

    Jonathan Feinberg wrote:
    I was not able to file a bug report
    You should file a bug report with Apple at http://bugreport.apple.com if you have a developer account or at http://www.apple.com/feedback/macosx.html if you do not have a developer account.
    Good luck w/your issue and please update this thread if you encounter a solution.

Maybe you are looking for

  • Lost ITunes on my laptop how do I get my old library back?

    Hi My laptop hard drive recently died, so had to get a new one installed. I've downloaded and installed Itunes 10 however when trying to synch its giving me the message The ipod is synched with another i tunes libraty.  Do you want to erase this ipod

  • Problem accessing a directory

    I have a program that created a temporary file that is quite large and I need to delete. It is in the directory "/private" but when I click on the startup disk that directory is not displayed. How can I access it?

  • Connecting IDES source system to BI Dev system

    Hi, Can we connect IDES R/3 system to BIW dev system??? If yes, then is it the same procedure for RFC or something different??? Thanks & Regards.

  • 10g preview : bc4j_framework_installer.jar has 0 bytes

    While searching for a class file in JAR files, the tool I used stumbled onto an empty JAR file (zero bytes): <JDEV_HOME>\jdev\doc\ohj\bc4j_framework_installer.jar I don't know if this is (un)intended or that it may cause problems somewhere, but since

  • New Firefox 3.6.15 always crashes on startup; how do I get back to 3.6.14?

    Firefox automatically updated from 3.6.14 to 3.6.15 and now I have no Firefox at all. It crashes every time app is selected; does not work in Safe Mode either. Anyone know how to get back to previous versions -- e.g., 3.6.14? If not, I guess I'm off