Lost with granting signed applet permissions

Hi all,
My apologies for the cross post, I have incorrectly sent this post to the jre forum but I think it is more specific to the signed aplpet forum..
We need to deploy a very simple applet which sole role is to connect to a domain other than mother to send and get some data. We have a certificate from Verisign and have signed the applet. So far so good. The applet is compiled and signed with the jdk 1.3.1_12. With the JRE 1.3.1_x, it works just fine. If the jre 1.4.2_x is installed however, the connection doesn't happen and we receive a permission denied exception instead:
java.security.AccessControlException: access denied (java.net.SocketPermission xxxxx resolve)
With jre 1.4.2, when the applet loads, we do see the security prompt, but we get the permission denied exception even if we specifically choose to trust the applet. I thought this step would automatically grant all priviledges?
So I don't know what to do from here. How can the applet request for the correct permission in jre 1.4.2_x? I looked around and found some information about policy files but I'm at a loss at how to use that, we have no control as to who will see the applet so I don't think we can ask all to update their policy file first.
What we want to have is for our users to grant priviledge at the security prompt and not worry about anything else, even with jre1.4. Can it be done?
Any help would be much appreciated.
Tim.

If the above information doesn't help you a full trace might come in handy:
To turn the full trace on (windows) you can start the java console, to be found here:
C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
In the advanced tab you can fill in something for runtime parameters fill in this:
-Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
if you cannot start the java console check here:
C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
add or change the following line:
javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
The trace is here:
C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log

Similar Messages

  • Problem with a signed applet and a user machine.

    Hello. I´m having some problems with a signed applet with some dependences.
    In one particular computer the applet doesn´t load.
    The java version installed in that computer is 1.6.0_25.
    The invocation tag:
    <applet name=applet id="applet" code=Applet/RequestApplet.class width=155 height=21 archive="RequestApplet.jar " MAYSCRIPT>
       <param id="parametro1" name="usuario" value="<Computed Value>">
    </applet>The RequestApplet.jar and dependences:
       bcmail-jdk13-145.jar(signed by bouncy castle), jce-ext-jdk13-145.jar(signed by bouncy castle), AbsoluteLayout.jar, plugin.jar, RequestApplet.jar(signed by me)*this files are all in the same folder.
    The requestApplet.jar manifest:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    X-COMMENT: Main-Class will be added automatically by build
    Class-Path: bcmail-jdk13-145.jar jce-ext-jdk13-145.jar plugin.jar Abso
    luteLayout.jar
    Created-By: 10.0-b23 (Sun Microsystems Inc.)
    Main-Class: Applet.RequestApplet
    Name: Applet/ResponseApplet$1.class
    SHA1-Digest: fO5IPiwEH3OhvlprhBecmMIAVJI=
    Name: Applet/NewJApplet.class
    SHA1-Digest: 6XSpm7lQEQRi39TegoUYv2aFJrk=
    Name: Applet/ResponseApplet.class
    SHA1-Digest: v1EbKUFB+QdvO05xx8UzAMNIyRs=
    Name: Applet/ResponseApplet$4.class
    SHA1-Digest: XH4I67psXZTelpz0AMAYc/Ej8QY=
    Name: Applet/RequestApplet$1.class
    SHA1-Digest: KAP5sAC4Thv/6GClkFAdGUVzgYA=
    Name: Applet/ResponseApplet$5.class
    SHA1-Digest: CVPnKrW2SgNEkRzYnVnQe3KGrIU=
    Name: Applet/ResponseApplet$3.class
    SHA1-Digest: SjfW1k1K7BA9m3AxmHi+jvRE+9o=
    Name: Applet/ResponseApplet$2.class
    SHA1-Digest: 3Pu18CZMLuEh7/n3y7XxFSkuNQY=
    Name: Applet/RequestApplet.class
    SHA1-Digest: Tky85es5+o371adetH9XVEI2Z+o=The error:
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
         at java.lang.Class.getConstructor0(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
         at java.awt.EventQueue.access$000(Unknown Source)
         at java.awt.EventQueue$1.run(Unknown Source)
         at java.awt.EventQueue$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         ... 20 more

    Thanks. I´ll try with your tips. But if i put all the dependences in archive I get this error.
    The tag:
    <applet name=applet id="applet" CODEBASE="." code="Applet/RequestApplet.class" width=155 height=21 archive="bcmail-jdk13-145.jar, jce-ext-jdk13-145.jar, AbsoluteLayout.jar, plugin.jar, RequestApplet.jar " MAYSCRIPT>
       <param id="parametro1" name="usuario" value="<Computed Value>">
    </applet>The error:
    Java Plug-in 1.6.0_25
    Usar versión JRE 1.6.0_25-b06 Java HotSpot(TM) Client VM
    Directorio local del usuario = C:\Documents and Settings\Administrator
    c:   borrar ventana de consola
    f:   finalizar objetos en la cola de finalización
    g:   liberación de recursos
    h:   presentar este mensaje de ayuda
    l:   volcar lista del cargador de clases
    m:   imprimir sintaxis de memoria
    o:   activar registro
    q:   ocultar consola
    r:   recargar configuración de norma
    s:   volcar propiedades del sistema y de despliegue
    t:   volcar lista de subprocesos
    v:   volcar pila de subprocesos
    x:   borrar antememoria del cargador de clases
    0-5: establecer nivel de rastreo en <n>
    basic: Receptor de progreso agregado: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@f39b3a
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/bcmail-jdk13-145.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/jce-ext-jdk13-145.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/AbsoluteLayout.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/plugin.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/RequestApplet.jar

  • Having trouble with my signed applet(if it's properly signed that is)

    hi
    I'm having trouble with my supposedly signed applet. I'm trying to execute a specific program in this case trilian from my browser. i'm using firefox
    first my java code
    package applet;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class RunApplet extends JApplet {
        JButton jButton = new JButton();
        FlowLayout flowLayout1 = new FlowLayout();
        public RunApplet() {
            try {
                init();
            } catch (Exception ex) {
                ex.printStackTrace();
        private void init() throws Exception {
            try {
                this.getContentPane().setLayout(flowLayout1);
                this.setSize(new Dimension(100, 200));
                jButton.setText("Trillian");
                jButton.addActionListener(new RunApplet_jButton_actionAdapter(this,
                        "\"C:\\Program Files\\Trillian\\trillian.exe\""));
                this.getContentPane().add(jButton, null);
            } catch (Exception e) {
                e.printStackTrace();
    class RunApplet_jButton_actionAdapter implements ActionListener {
        private RunApplet adaptee;
        private String programPath;
        RunApplet_jButton_actionAdapter(RunApplet adaptee, String programPath) {
            this.adaptee = adaptee;
            this.programPath = programPath;
        public void actionPerformed(ActionEvent e) {
            try {
                Runtime.getRuntime().exec(this.programPath);
            } catch (IOException ex) {
    }And my applet code
    <html>
    <body>
    <!--"CONVERTED_APPLET"-->
    <!-- HTML CONVERTER -->
    <object
        classid = "clsid:CAFEEFAC-0015-0000-0005-ABCDEFFEDCBA"
        codebase = "http://java.sun.com/update/1.5.0/jinstall-1_5_0_05-windows-i586.cab#Version=5,0,50,5"
        >
        <PARAM NAME = CODE VALUE = "applet.RunApplet.class" >
        <PARAM NAME = ARCHIVE VALUE = "myfile.jar" >
        <param name = "type" value = "application/x-java-applet;jpi-version=1.5.0_05">
        <param name = "scriptable" value = "false">
        <comment>
         <embed
                type = "application/x-java-applet;jpi-version=1.5.0_05" \
                CODE = "applet.RunApplet.class" \
                ARCHIVE = "myfile.jar"
             scriptable = false
             pluginspage = "http://java.sun.com/products/plugin/index.html#download">
             <noembed>
                </noembed>
         </embed>
        </comment>
    </object>
    <!--
    <applet CODE = "applet.RunApplet.class" ARCHIVE = "myfile.jar">
    </applet>
    -->
    <!--"END_CONVERTED_APPLET"-->
    </body>
    </html>Creating my key:
    keytool -genkey -alias sitekey -keystore "C:\Program Files\Java\jdk1.5.0_05\jre\lib\security\cacerts"Now the process of creating the jar file and signing it:
    1. jar cf myfile.jar *.class
    2. jarsigner -keystore "C:\Program Files\Java\
    jdk1.5.0_05\jre\lib\security\cacerts" myfile.jar sitekeyNow this is the way i've been using then and the first time i get the "do you want to trust" screen but still i get a security exception.
    Exception in thread "AWT-EventQueue-10" java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkExec(Unknown Source)
         at java.lang.ProcessBuilder.start(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at applet.RunApplet_jButton_actionAdapter.actionPerformed(RunApplet.java:73)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)Is there anybody who have an idea what can be wrong?
    regards
    thallish

    ok i solved i myself. i assigned a different and thereby correct keystore and now it works like it should
    regards
    thallish

  • What happen with my Signed applet

    Hi all
    I have just made a Signed applet
    Step by step:
    1. I made applet source code
    2. I made a HTML file
    3. I build applet source code
    *javac FirstApplet.java*
    *jar cf FirstApplet.jar *.class*
    *keytool -genkey -keystore mykeystore -alias launcheralias*
    *keytool -selfcert -keystore mykeystore -alias launcheralias*
    *jarsigner -keystore mykeystore FirstApplet.jar launcheralias*
    *del *.class*After that i run HTML the first.
    it appears to me a message
    *WARING SECURITY*
    *The application's digital signature can not vertifed*
    *Do you want to run the application ?*I check option *"Always trust content from this pulisher"* --> My program still runs well
    I dont understand why when i run my applet the firt it appears to me that message.
    What is wrong and how to solve ?
    Please help me.
    Thanks in advance.
    Diego

    Actually the above same prob is faced by me in my application.
    The application's digital signature can not vertifed
    Due to this pop up, our customer thinks our certi is nt valid & its nt possible to make them understand abt it since they feel insecure.
    This warning appears due to JVM running along with application.
    If we go to
    Control Panel->Java->Security->Certificates and choose secure sites in Certificate type.
    Here link of my web application should appear, in order to remove this warning.
    So is there any way so that link of my web application shpuld be directly installed on the above mentioned location on Client's PC??? or any other alternative
    Please Helppp...

  • Problem with accessing Signed Applet from javascript method

    Hi,
    I am facing the following problem while accessing Signed Applet from javascript method.
    java.security.AccessControlException: access denied (java.io.FilePermission c:/temp.txt read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at FileTest.testPerm(FileTest.java:19)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    I am using jdk1.5 for my development...
    Can anyone help to resolve this security issue. Urgent...
    Thanks in advance.

    Hey thanks. I wasn't able to get it to work with that sample but I did find this very similar code that does allow javascript to call JFileChooser in an applets public method.
    java.security.AccessController.doPrivileged(
    new java.security.PrivilegedAction()
    public Object run(){                           
    //do your special code here
    return null; //return whatever you want
    It seems a bit tempermental in that if you don't select a file quickly, it will hang the browser....no perfect solution but I'm going in the right direction.
    Thanks,
    Scott

  • Lost with signed applet permissions

    Hi all,
    We need to deploy a very simple applet which sole role is to connect to a domain other than mother to send and get some data. We have a certificate from Verisign and have signed the applet. So far so good. The applet is compiled and signed with the jdk 1.3.1_12. With the JRE 1.3.1_x, it works just fine. If the jre 1.4.2_x is installed however, the connection doesn't happen and we receive a permission denied exception instead:
    java.security.AccessControlException: access denied (java.net.SocketPermission xxxxx resolve)
    With jre 1.4.2, when the applet loads, we do see the security prompt, but we get the permission denied exception even if we specifically choose to trust the applet. I thought this step would automatically grant all priviledges?
    So I don't know what to do from here. How can the applet request for the correct permission in jre 1.4.2_x? I looked around and found some information about policy files but I'm at a loss at how to use that, we have no control as to who will see the applet so I don't think we can ask all to update their policy file first.
    What we want to have is for our users to grant priviledge at the security prompt and not worry about anything else, even with jre1.4. Can it be done?
    Any help would be much appreciated.
    Tim.

    Apologies, I think this post would have been more suited for the sigend applet forum. I have reposted there, please ignore the post in this forum.

  • Problems with RSA Signed Applets methods called by JavaScript

    Hi Folks,
    I need to give all permissions to an Applet used in an Intranet application, so I signed the jar containing it with a RSA self-cert and I did the same for all the other jar files userd by the applet.
    The applet runs under Java Plugin with JRE 1.5.0_06: I am requested by the browser to install the cert and all works fine.
    When a JavaScript function calls a public method of the applet I received a security exception when the code tries to read a system property.
    The same method works fine if called by the applet itself or by a gui event (i.e. a button click) inside the applet, so the problem seems to be related to the fact the applet is used by JavaScript (in Explorer 6).
    Does anyone know some way to overcome this problem????
    Message was edited by:
    piero

    If I may be so bold as to ask you to elaborate on this fix? I have encountered an identical issue, but I have no idea about your reference to your fix, sorry.

  • Problem with a sign Applet - certificate isn't recognized

    Hello to all the java experts
    I have created a certificate using keytool. I have exported the certificate and installed it on the computers of the users. The certificate worked well on all the computers except one. I have got a message:
    java.security.cert.certificateException unable to verify the certificate CA root
    I want to add that when I installed this certificate I got a message that it was imported successfully and I have also seen that the certificate is valid. I imported it by double-clicking on the crt file and choosing "install certificate". I also tried to import it by using the command: keytool -import -alias company -keystore carets -storepass changeit -file c:\crtfile.crt.
    I have checked that the certificate was imported by the command:
    keytool -list -v -keystore company
    The only thing which is different on this computer is the plugin of swing (1.3.01 and not 1.3.02)
    What can cause to this problem? How can I fix it?

    Noone has any idea?

  • Signed applet not working with weblogic 5.1

    I have a problem with a signed applet. The applet is signed correctly
    and it starts up the dynamic trust management console in java plugin
    1.3.1_02 when accessed locally with the browser. But when trying to
    access the applet through weblogic (5.1) the dynamic trust management
    doesn't popup, as if the applet is not recognized as signed. In the
    weblogic policy file in WLS I have set permissions to include the
    applet class (AllPermission given to codeBase https://-, and file:/-
    to be sure that it's not the problem).
    I have tryed to run it under both http and https. I'm not making an
    rmi connection back to WL. I'm simply trying to write on the local
    file system with the applet.
    The error received in the javaconsole is java.lang.SecurityException:
    java.lang.SecurityException: Unable to create temporary file
         at java.io.File.checkAndCreate(Unknown Source)
         at java.io.File.createTempFile(Unknown Source)
         at java.io.File.createTempFile(Unknown Source)
         at com.primelog.applet.DirectPrintAppletSigned.downloadFileToPrint(DirectPrintAppletSigned.java:64)
         at com.primelog.applet.DirectPrintAppletSigned.run(DirectPrintAppletSigned.java:32)
         at java.lang.Thread.run(Unknown Source)
    I really apreaciate any tips you might have!

    yeah. I noticed the same thing. now the splash screen comes on without the flashing green squares and just hangs. i tried unintalling and then reinstalling and still no go. kind of annoying but they will probably come out with an update pretty soon

  • NIGHTMARE! Signed Applet - No Access. Please Help.

    Hi:
    I'm trying to make a signed applet gain access to my directory structure.
    I created a simple applet to test with one line:
    sErr = System.getProperty("user.dir");
    The code is below.
    I sign it using the following:
    keytool -genkey -keyalg rsa -storepass MyCerts
    As you can see I'm using the default keystore but I've tried it by using -keystore MyKeystore too.
    It runs me through all the questions which I answer, no problems.
    Then I sign it:
    jarsigner -signedjar SSignedApplet.jar SignedApplet.jar MyCerts
    It asks for the passwords which I enter.
    It completes without error and the SSignedApplet.jar file shows up in the directory.
    If I open the signed jar file it has all 3 of the files in the META-INF folder and the Manifest file looks right to me.
    I upload the jar and the Default.asp file to a Web server (I've tried localhost and a remote host).
    I open the page and the pop up comes up asking if I want to trust the unverified applet. I click 'Run'.
    Once the applet is 'Started' I click the 'Get Properties' button and I get the error:
    access denied (java.util.PropertyPermission user.dir read)
    I've tried 2 examples that work fine on my machine (that I didn't write).
    The first is by Francois Orsini (Derby Demo) and the other is by Laura MacDougal (successfully wrote a file to my user.dir directory).
    No matter what I do, I can't sign an applet and make it access anything.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html lang="en-US">
    <head>
    <script language="JavaScript" type="text/javascript">
    <!--
    function getProp()
         oApplet = document.SampleApplet;
         oApplet.getProp();
         alert(oApplet.sErr);
    // End SCRIPT -->
    </script>
    </head>
    <body bgcolor="#ffffff" style="margin:0px auto;width:800px;padding:0px">
    <form name="fmLogin" action="" method="POST">
    <table width="650" align="center" cellpadding="0" cellspacing="0">
         <tr>
              <td>Login</td>
              <td><input name="Login"></td>
         </tr>
         <tr>
              <td>Password</td>
              <td><input name="Password"></td>
         </tr>
         <tr>          
              <td colspan="2"><input type="button" onclick="getProp();" value="Get Property"></td>
         </tr>
    </table>
    </form>
    <APPLET CODE="SignedApplet.SampleApplet.class" WIDTH=1 HEIGHT=1 NAME="SampleApplet" ARCHIVE="SSignedApplet.jar"></APPLET>
    </body>
    </html>
    package SignedApplet;
    import java.applet.*;
    import java.io.*;
    import java.util.*;
    public class SampleApplet extends java.applet.Applet {
        public String sErr = "";
        public void init() {
            // TODO start asynchronous download of heavy resources
        public void getProp()
            try
                sErr = System.getProperty("user.dir");
            catch(Exception exp)
                sErr = exp.getMessage();
        // TODO overwrite start(), stop() and destroy() methods
    }

    Thank you for reading my reply in your other thread:
    http://forum.java.sun.com/thread.jspa?threadID=762212&messageID=4368224#4368224
    If you've really run through it you would have known that code called from
    javascript is not trusted and you have to use doprivileged (hey its in bold...
    why would that be?).
    Call getProp from init within the applet and you've got no problem.
    As for your imageIcon, creating one with string as a parameter
    the string is used as input for a File. I had no problem loading one with a signed applet.
    I'll post the example later in your other thread.

  • Signed applet gets email address

    Hi,
    I am working with a signed applet to get the email address setup up in the browser for both Nescape and IE. Is it possible to do that?
    Thanks
    Tak

    You can only get the user's e-mail address if he/she is willing to give it to you -- the fact that you're using a signed or unsigned applet is irrelevant.
    V.V.

  • Signed Applet and Bluetooth

    Is it possible to establish a bluetooth connection with a signed applet?

    Try this:
    OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = "600" HEIGHT = "400" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    <PARAM NAME = "java_code" VALUE = "TNA.class" >
    <PARAM NAME = "java_archive" VALUE = "TNA.jar" >
    <PARAM NAME = "java_type" VALUE="application/x-java-applet;version=1.3.1">
    <PARAM NAME="scriptable" VALUE="false">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.3.0" CODE = "TNA" ARCHIVE = "tna.jar" WIDTH = "600" HEIGHT = "400" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED></COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>
    <!--
    <APPLET CODE = "TNA" ARCHIVE = "tna.jar" WIDTH = "600" HEIGHT = "400">
    </APPLET>

  • 7u45 blocks a signed applet with a "sandbox" Permissions attribute in the manifest

    Oracle announces that all applets need to be signed with "sandbox" or "all-permissions" Permissions attributes in the next 7u51. Therefore current unsigned applets need to be signed with "sandbox" Permissions attributes. I confirmed that such applets correctly run in recent beta 7u60-ea-b01, but could not run in current 7u45. If so, such newly signed applets must force end-users to install 7u51, otherwise such applets need to be "all-permissions" applets unnecessarily. Is it correct behavior?

    Oracle announces that all applets need to be signed with "sandbox" or "all-permissions" Permissions attributes in the next 7u51. Therefore current unsigned applets need to be signed with "sandbox" Permissions attributes. I confirmed that such applets correctly run in recent beta 7u60-ea-b01, but could not run in current 7u45. If so, such newly signed applets must force end-users to install 7u51, otherwise such applets need to be "all-permissions" applets unnecessarily. Is it correct behavior?

  • Signed applet does not grant AudioPermission "record"

    From what I gather, if I have a trusted signed applet sitting on a webpage and
    the visitor accepts (runs) the applet, then they should not need to have:
    grant {
    permission javax.sound.sampled.AudioPermission "record";
    in their java policy file. Well I have done all this (with a certificate from
    Thawte) and posted a thorough example at:
    http://www.livesite.net/JavaSoundTest
    At the bottom of that page there is a "Check permissions" link which will alert
    true/false if we have record permission. Clicking any "Record" link will
    attempt to open a TargetDataLine.
    My experience (and problem) is: record permission must be granted even though
    the applet is signed by a trusted CA.
    I would very much appreciate any help.
    Are you able to record/playback (without granting record permission in your
    java policy files) with the JavaSoundTest applet webpage?
    Is there something I am missing?
    ------ More information ------
    Java Control Panel -> Advance -> Security
    'allow user to grant permissions to signed content' is checked
    Reproducable on:
    MS NT4 w/ IE6
    MS Windows 2000 w/ Firefox 1.5
    MS Windows XP w/ Firefox 1.5
    MS Windows XP w/ IE6
    Fedora FC6 w/ Firefox 2.0
    Also, this happens with a commented-out record permission in the user
    .java.policy file, or when the policy file does not exist.
    ------ Source code: opening the target data line ------
    Using the JavaSoundTest applet page without granted permission, clicking a
    record link will yield this exception in the java console:
    java.security.AccessControlException: access denied (javax.sound.sampled.AudioPermission record)
    at java.security.AccessControlContext.checkPermission
    at java.security.AccessController.checkPermission
    at java.lang.SecurityManager.checkPermission
    at com.sun.media.sound.JSSecurityManager.checkRecordPermission
    at com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen
    at com.sun.media.sound.AbstractDataLine.open
    at net.livesite.jsound.Recorder.run(Recorder.java:161)
    while opening a TargetDataLine as:
    23 private static TargetDataLine line;
    157 line = (TargetDataLine) AudioSystem.getLine( lineInfo );
    158
    159 try
    160 {
    161 line.open( format, (int) format.getSampleRate() );
    162 }
    ------ Source code: Using the security manager ------
    The "Check permissions" link on the TestJavaSound applet page calls this method:
    191 public boolean hasSoundRecPriv()
    192 {
    193 boolean ret = false;
    194
    195 try
    196 {
    197 SecurityManager sm = System.getSecurityManager();
    198 if (sm != null)
    199 {
    200 sm.checkPermission(new AudioPermission("record"));
    201 }
    202 ret = true;
    203 }
    204 catch(SecurityException e)
    205 {
    206 ret = false;
    207 }
    208
    209 return ret;
    210 }
    (This is a continued post from JAVASOUND-INTEREST at SUN.COM)

    Is there something I am missing?1) Applets are not well supported by Sun,
    and are inherently problematic as a reult
    of that.
    2) My experience suggests that the diagnotics
    applet is not reliable for detecting JMF.
    3) I guess the JMF applet is doing checks of
    policy files, despite the signed code.
    You might circumvent most of these problems,
    by using web-start to launch an application.
    Here are some of my tests at launching
    JMF using web-start.
    http://www.javasaver.com/testjs/jmf/

  • Granting SocketPermission using signed applet

    I have had a dream of locally caching a jar file for an applet so that all the code will be on the client machine after the first time the applet was loaded. Basically, I have a very thin applet composed of a jar class loader and a tiny applet which will check for a jar file on the client and download it from the server if it does not exist. These simple classes are in a signed jar file. Basically, this thin applet does the following:
    1) Check for the big, app jar file in c:\Temp
    2) If it does not exist, open a URL input stream and get the big jar
    3) instantiate a jar class loader object on the now local, big jar file
    4) load the "main" class
    5) use reflection to run its initialization method
    6) the application then attempts to open a socket to the server
    I get all the way to step 6 and this is where things go bad. As far as I can tell, the "thin" app loader class has permission to do anything it wants since it was downloaded from a signed jar - I haven't tried to do anything I was not able to do with this class. I think the problem arises because the app class came from a non-signed jar file and it appears to have all the typical applet restrictions. I can make URL connections to the local client (since that's where the code was loaded from), but not anywhere else.
    I was hoping all classes the "thin", privileged class loaded would inherit these privileges, but obviously the class permissions come from where the class was loaded from. This is a bummer and my guesses for solving this problem are:
    1) grant permission to the entry class for the app somehow (I tried something like this by executing the entry method for the app in a AccessController.doPrivieleged block - no luck)
    2) sign the app jar and somehow read and accept its certificate so that all classes loaded from this jar are privileged (I am not sure of how to do this)
    I am hoping someone might have an elegant solution to this problem as this is really the last step in my caching solution. By the way, the entry app class is not an applet itself if this is useful information to anyone. The "thin" applet is the only applet and just hands control off to the entry method of the main app class in the jar.
    TIA!

    Signing an applet provides it with the ability to run outside the sandbox. This does not automatically give the applet permission to do anything it wants. The applet must still request the desired permission before actually attempting an operation that requires that permission. Depending on the browser or whether you are relying on the Java plugin, you need to call the necesary security method first. I wrote a signed applet back in May 2000 which also needed socket permission. I don't have access to the code anymore so I cannot recall exactly the classes and methods you need to invoke. If you search the Signed Applets forum for my name, there are several messages that should help you.
    For example:
    http://forums.java.sun.com/thread.jsp?forum=63&thread=132336

Maybe you are looking for

  • LOVs in Detail Table

    Hi I've been generanting pages with LOVs in table layouts, I have an specific problem with LOVs in forms with two tables in the same page (one master and the other details, its generated with the option master and detail on Same PAge). The first tabl

  • I have a Mac osx 10.5.8 I HAD a Firefox browser but got sucked in by an update offer and now I have no Firefox browser and cannot get it back. Please advise.

    I have a mac powerbook G4 OSX 10.5.8 I USED to have a Firefox browser, but I got sucked in by an invitation to update, didn't realize that the circle with a line through it meant, "don't try to put this in your computer" but it must mean something li

  • Search for String patterns in a Database table

    Hi There is a select statement using where condition with a like statement WHERE table1  <> 'JP'              AND (                  ( field1 LIKE '%:%' OR field2 LIKE '%:%' )       It fetches records where the field field1 or field2 has string:strin

  • IPod Photo 60G and Windows problems

    I am unable to connect my Photo 60G iPod to my current computer. I can connect it successfully to my laptop, so I know that the fault is not with the iPod or the iPod cord. I can connect my daughter's rather elderly 10G iPod to this current machine s

  • Problem emailing using Mail from iPhoto.

    When I email photos from iPhoto using Mail and have text under the photos some of the recipients receive the photos with the text superimposed onto the photo making it illegible. Is there some way to avoid this? If I send a copy to me everything is f