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

Similar Messages

  • Please HELP !!! Signed Applet & Java Media Framework(JMF)

    Hi,
    I have written a self signed applet that is used for Recording voice running in browser:
    The tag that I've given is as follows:
    <OBJECT
    classid = "clsid:CAFEEFAC-0014-0001-0000-ABCDEFFEDCBA"
    id="recordApplet"
    codebase = "http://java.sun.com/products/plugin/autodl/jinstall-1_4_1-windows-i586.cab#Version=1,4,1,0"
    WIDTH = 268 HEIGHT = 27>
    <PARAM NAME = CODE VALUE = "RecWindow">
    <PARAM NAME = ARCHIVE VALUE = "jmf.jar,sound.jar,SignedRecWindow.jar">
    <PARAM NAME = "soundtrack" VALUE="testFile.mp3">
    <PARAM NAME = "type" VALUE = "application/x-java-applet;jpi-version=1.4.1">
    <PARAM NAME = "scriptable" VALUE = "true">
    <PARAM NAME = "MAYSCRIPT" VALUE = "true">
    </OBJECT>
    I've also signed jmf.jar as well as sound.jar that come in JMF 2.1 and am including it the archive. These jars are downloaded on client machine.
    My code works perfectly BUT only when JMF 2.1 is installed on the clients machine else I get a RunTime Exception stating "no permission to capture from applet".
    JMF FAQ states that If a user chooses to allow playing back locally stored media files or saving media files locally, he/she can do so by making use of a policy file. http://java.sun.com/products/java-media/jmf/2.1.1/faq-jmf.html#jmf2-applet-run
    My requirement is that once the user has agreed to the signed applet to run then there should be no need to install JMF rather use the jmf.jar that is downloaded on client machine.
    Also how can I grant the permission (permission javax.sound.sampled.AudioPermission "record";) to my applet in client computers ?
    The client should not be asked to add any files (policy) by itself, all must be transparent for him.
    Thanks in advance.
    Vipin.

    I too have been trying to get Java JMF sound recording to work via webstart. No luck so far.
    I even tried playing (security.AllPermissions) with .java.policy file in the user's home directory and even modifying java.policy in the JRE/lib/security directory. No luck there too!
    I also added security.AllPermissions to the javaws.policy in the JRE/jawas/javaws.policy file. Still no luck!
    Any idea, anyone?

  • WebService call from signed applet and MS Vista

    Hi.
    I'M developing a system that needs to call web services from a signed applet.
    I have made the solution like this.
    The applet starts by checking that the 12 needed libs is present under the <java home>\lib\ext folder. if not it will download the files automatically and restart the browser.
    This works fine in Windows XP because the signed applet gives me read/write access to the whole machine, but in Vista this isn't possible anymore (as i understand it).
    My question: Is it possible to put these libs in another folder that the ext lib? I have tried to define the "archive" tag in my Object tag but i get the class not found exception thrown in my face.
    If there is a solution to this i would very much like some pointers!
    If not what can i do to get access to the <java home>\lib\ext folder under Vista?
    Regards
    Michael Pallesen

    When invokin applet methods via javascript, you are accessing privileged actions from an unsafe source.
    Depending on your needs, you could either load the system variables in applet init into class variables and return the information contained in the class variables to javascript or wrap the method calls inside AccessController.doPrivileged() calls.

  • Signed Applet problems

    Hi all,
    I have a problem with one applet. I just built an applet (JDK 1.2) to download a file to the local machine; so far is OK, I got my digital certificate and I have signed the applet. Now when I test it in IE 5.x or 6.x it shows me the certificate and of course I trust, so it writes to the local hard drive, but when I try to test in Netscape 4.7 or greater; it shows me the certificate, I choose the "Trusted option" but I got the error:
    access denied (java.io.FilePermission c:\mwSave.dll write)
    I don't have any idea why if my applet is already signed and the certificate is valid I am getting this error... I am using a signed applet to do not use the policy file.... and should work, well I think that....
    Any ideas....
    Thanks in advance.

    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

  • Signed applet : problem signing jar files that are in build path

    Hello,
    I have a problem while trying to create an ftp applet.
    I use org.apache.commons.net.ftp and i build path for commons-net-1.1.4.jar and then i build my classes.
    When i create a jar file with my classes and after signing it, it works under eclipse but not on a web page.
    I had signed commons-net-1.1.4.jar before to build the path in eclipse but commons-net-1.1.4.jar is not in my jar file.
    What is the way to sign applet correctly even if some jar ressources are in eclipse build path.
    Thank you

    You were right!!!
    I'm not sure what to write down in the formsweb.cfg (configuration file) , following the instructions on the on-line help of Developer Forms 10g , in step 9..
    The step 9 says...
    Because in this release the JACOB code is in an external Jar file and not incorporated into frmwebutil.jar, it needs to be downloaded. To do this, change the WebUtilArchive setting to read: webUtilArchive=/forms/webutil/frmwebutil.jar,/forms/webutil/jacob.jar
    The doudt is pointed to the fact that the frmwebutil.jar isn't in the ORACLE_HOME\forms\webutil path but it is ORACLE_HOME\forms\java path.
    Also , these paths referenced in webUtilArchive are physical paths in a Unix system or they are logical paths in a url?
    Simon

  • Self signed applet problem

    Hello java gurus,
    I have a self signed applet which must read and write from mysql DB.
    The sign is OK, the popup "warning security" is here but I still have a SQL Exception :
    java.security.AccessControlException: access denied (java.util.PropertPermission file.encoding read)
    I don't want to change the java policy and I work on plugin 1.4.1_02.
    I think the problem is with the certificate cause it should give permission to applet, but it doesn't.
    Any help will be very pleasant

    From the plug-in control panel, click certificates
    then the Signer CA radio button. These are the
    certifying authorities that the client plug-in will
    accept as valid for signed code. Obviously, if any
    client would just accept self-signed code as trusted,
    it wouldn't provide much security. For a purely
    internal app, you can generate a cert and install it
    on the clients which will accept your own signing as
    trustworthy.I think I can deal with this properly if you just clear up one thing for me: when you say 'install it on the clients' do you mean use the Plug-In Control Panel to load the certificate using the "Certificates" tab? From there click the "Signed Applet" radio button and "Import" and browse for the cert file? Or does creating this HTML file and clicking on a link to the certificate do something else? I think I am generating my self-signed certificate correctly and signing my jar correctly, but my applet is failing to initialize. Any further help on this much-maligned topic? :)
    Thanks,
    B. Rintoul

  • Signed applet problem: signer information does not match...

    hi all,
    i am actually making a upload component using applets that
    would need to access the local file system for uploading
    files.
    I have created a signed applet(i have followed all the steps,
    such as those of creating a jar, creating a key/value pair
    using keytool and finally signed my jar file using
    jarsigner). when i try to access this applet in a browser,
    first the security certificate displays(which is fine),but
    then when i click on "grant permission", it gives me a error
    saying java.lang.SecurityException: signer information of
    a(particular class of mine)does not match with that of other
    classes in that......(rest is not visible)
    i don't understand why this is happening...i have tried to
    repeat all the steps..but still continues to give this error.
    can anyone help plz...? i am stuck bceauz of this..as the
    JFileChooser dialog box doesn't open up..from which i had to
    browse and select files..
    Thanks in advance
    sd76

    first the security certificate displays(which is fine),but then when i click on "grant
    permission"Not sure what you're talking about, when I sing an applet and open it with IE and jre 1.5
    I get a window titled "Warning - Security". It askes me if I trust the signed applet and
    gives me the options yes, no and allways. But never got the "grant permission dialog".
    Here is how I signed the applet and got it to read local file system:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post

  • Signed Applet - Problem reading large local files

    Hello,
    I am using a signed applet (self-signed) to read files from a clients machine (local file system). Following is the code for buffered reading (the meat):
    String thisLine, ret = "";
    try{
         BufferedReader myInput = new BufferedReader(new FileReader(fn));
         while ((thisLine = myInput.readLine()) != null) {
         ret += thisLine + "\n";
         myInput.close();
    catch (Exception e) {
         ret = "Cannot load, exception!";
    When I read a file <= 512KB, it runs fine/as expected. Now, when I read a file, say for example 1024KB in size, I expect the application to take twice as much time (than 512KB file) and read the file, but instead the applet/browser hangs. As a matter of fact I am not able to read files > 512KB.
    So, is there a limit on file size (from local file system) when reading from an applet, or is it to do with the way I am reading it?
    Any help, suggestions or comments would be highly appreciated.
    Thanks in advance.

    Here is how I read a file from my applet:
         private String getData(String u) {
              URL url = null;
              InputStream in = null;
              String ret = null;
              try {
                   // the following line wil read a file @ the same location as your class file
                   // this way your applet does not need any special privileges
                   // you could change the url to a file if so needed
                   url = new URL(this.getCodeBase(), u);
                   URLConnection conn = url.openConnection();
                   // next line is optional and just tells the http server
                   // a utf-8 response is accepted
                   // some servers will return a bad request
                   conn.setRequestProperty("Accept-Charset","utf-8");
                   // first try to find out if the server has
                   // provided us with the charset of the response
                   // since this doesn't work with the msjvp (version 1.1.2)
                   // it's commented out
                   // instead provide a charEncoding yourselve
                   String charEncoding = "UTF8";
    //               int i = conn.getHeaderFields().size()-1;
    //               while(i>-1){
    //                    System.out.print(conn.getHeaderFieldKey(i));
    //                    System.out.print("=");
    //                    System.out.println(conn.getHeaderField(i));
    //                    if(conn.getHeaderField(i).toLowerCase().indexOf("charset")!=-1){
    //                         String charsetLine = conn.getHeaderField(i).toUpperCase();
    //                         if(charsetLine.indexOf("SHIFT_JIS")!=-1){
    //                              charEncoding = "Shift_JIS";
    //                         if(charsetLine.indexOf("EUC-JP")!=-1){
    //                              charEncoding = "EUC-JP";
    //                    i--;
                   // here is the value for char encoding (as a parameter in the <object html tag)
                   if(this.getParameter("dataCharset")!=null){
                        charEncoding=this.getParameter("dataCharset");
                   // wither you have a file or an url you read from an inputstream
                   // here is how it's done
                   // read the whole file and than turn it into a string
                   in = conn.getInputStream();
                   ByteArrayOutputStream bos = new ByteArrayOutputStream();
                   int len;
                   byte[] buf = new byte[1024];
                   while ((len = in.read(buf)) > 0) {
                        bos.write(buf, 0, len);
                   in.close();
                   // you have the file as a byte array (bos.toByteArray()
                   // here is how you turn it into a string
                   ret = new String(bos.toByteArray(),charEncoding);
              } catch (Exception e) {
                   e.printStackTrace(System.out);
              return ret;
         }

  • Signed applet problem with 1.3.1 but same workin in jre1.4

    Hi,
    I have performed the following steps to sign an applet
    1. javac search.java
    2. jar cvf Search.jar *.class
    3. keytool -genkey -alias signFiles -keystore abs_stores -keypass
    123456 -storepass 123456
    4. jarsigner -keystore abs_stores -storepass 123456 -keypass 123456 -
    signedjar SignedSearch.jar Search.jar signFiles
    The applet searches for some files in the hard drive.
    The problem is when I user Jre 1.4,IE 5.5 the applet works but it does not with
    jre1.3.1
    I need it to work with jre1.3.1.
    can someone help me out.
    thanks,
    Anshuman

    I use the following in HTML
    <OBJECT
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = 350 HEIGHT = 300
    codebase="http://java.sun.com/products/plugin/1.3.1/jinstall-131-win32.cab#Version=1,3,1,0">
    <PARAM NAME = CODE VALUE = "Search" >
    <PARAM NAME = CODEBASE VALUE = "." >
    <PARAM NAME = ARCHIVE VALUE = "SignedSearch.jar" >
    <PARAM NAME="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.1"
    CODE = "Search"
    CODEBASE = "."
    ARCHIVE = "SignedSearch.jar"
    WIDTH = 350
    HEIGHT = 300
         scriptable=false
         pluginspage="http://java.sun.com/products/plugin/1.3.1/plugin-install.html">
         <NOEMBED>
              </NOEMBED>
         </EMBED>
    </COMMENT>
    </OBJECT>
    thanks,
    Anshuman

  • Signed Applet problem

    Hi all,
    I have a problem about disappering the "JApplet Window" Text.
    I am now writing a JApplet using swing technology. The JApplet want to access the local client harddisk so I need to sign the applet. There are serveral classes, one is extending JApplet and the other are extending JDialog. the JApplet class will show or hide the JDialog class.
    In the JDialog class, it will validate something and it will popup error dialog by using JOptionPane.showMessageDialog(). However, the problem occur, the popup dialog has a text "JApplet Window" at the bottom.
    I want to make the text disappear, Can you tell me the way to do that?
    thanks

    when you sign the applet, you are signing the Jar file, so any "dialogs" created from classes in the signed jar, shouldn't have that message on their windows. But then again, neither should popup menus in unsigned applets, but sometimes it does.

  • Signing applets problem

    ... I did it! kinda...
    my applet is at www.twilightfolk.com/holycrap
    it is signed by a homemade key I aliased as musselman and exported a cert for.
    It's pretty specific to windows users, but the applet simply lists all the files/subfiles in the drive:\folder you specify. It will only look at folders that start with PAT, REL, or EME.
    Somehow I got it working on IE, but it doesn't work in Firefox and my friends can't seem to get it to work on their machines either. Basically if you select a drive with a folder starting with any of the aforementioned strings, it should give you a list of all of the folders named like that in the second combo box. If it doesn't it's a permissions error.
    I created a .java.policy file for this particular certificate, the contents of which is:
    keystore "C:\\Documents and Settings\\djmusselman\\workspace\\Discrepancy\\formshow\\davidstore";
    grant signedBy "musselman"{
              permission java.io.FilePermission "<<ALL FILES>>", "read";
              permission java.io.FilePermission "<<ALL FILES>>", "write";
              permission java.io.FilePermission "<<ALL FILES>>", "execute";
              permission java.io.FilePermission "<<ALL FILES>>", "delete";
    I've got the cert if anyone thinks they need it or wants to try it out. I promise this thing doesn't do anything malicious :-P

    Have you tried signing your applet?
    to sign an applet , you can approach 3d parties like Thawte or you can sign them yourself.
    Package your class file into a .jar, Create your own keystore, sign the jar file using this keystore.
    Then you will be able to open it in a browser.

  • Sign applet problem

    Hi,
    I am following the 10 steps by irene to sign the applet. When I go to number 10, if I want to use self-signed certificate, then i need to import self-signed certificate into the cacerts keystore. However, I don't want my clients to do this thing as they probably don't know how to do this. All I want is my client click the "grant" button and the applet inits. So, are there any other methods to do this?

    Hi,
    I am following the 10 steps by irene to sign the
    applet. When I go to number 10, if I want to use
    self-signed certificate, then i need to import
    self-signed certificate into the cacerts keystore.
    However, I don't want my clients to do this thing as
    they probably don't know how to do this. All I want is
    my client click the "grant" button and the applet
    inits. So, are there any other methods to do this?I dont think so, it would open the flood gates for malicious programs. i can write a program that format ur harddisk, sign it and then give it to you.Cacerts contains a list of CAs trusted by the client. That means, The clients still have to approve/agree/import it.
    In your case, u can give the cacerts file to the clients and ask them to copy it to the lib\security directory.

  • Please Help me Solve My Signed Applet Problem

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

    hopefully this answers your question
    https://helpx.adobe.com/flash/using/using-sounds-flash.html

  • Problem on runtime enviorment for signed applet

    I am using the Java Media Framework for video capturing .Problem which i am facing is i have to configure the client machine so i wanted to download few of the class files which will execute on the client side and then stream the video back to the server .For this i have dezigned a java applet.This applet is signed by myself without any external agency so when ever the application is executed where it was signed this application gives no problem but when a different machine access the applet the user is asked for the verification of the applet but the error is thrown stating that the class not found exception .So please guide me that while making a signed applet which all packages need to be signed and what is the procedure .Do i have to sign the jmf packages also .

    I have signed applets but not with jmf. Your best bet is to put the applet in a jar and sign the jar. Most java runtimes with a self signed applet will prompt the user and ask the user if they want to grant permission. You probably have to use the java html converter to code your html to force the use of suns plugin. I am not sure if you have to sign the jmf jars or they may already be signed.

  • JMF with Native Libraries as Signed Applet

    Hello
    After spending a few days hunting through forums, digging into JMF source code and hacking in the dark I'm about to give up, but thought I'd start yet another thread on this. It's a long, sad story...
    Problem: Deploying a JMF based program that relies on native libraries (in this case the FOBS4JMF bindings) as an applet: how to get jmf.properties and the native libraries loaded properly.
    Partial Solution: the native libraries packaged in a signed jar file, added to the applet's archive property, extracted using getResourceAsStream(), and loaded using System.load(). This is how FOBS4JMF loads it's native library anyway (via the com.moesol.NativeLibraryFinder):
    Class classInApplet; // name of a class loaded by the applet
    File outputFile; // location for extracted library
    InputStream is = classInApplet.getResourceAsStream(resource);
    copyStream(is, outputFile);
    System.load(outputFile.getAbsolutePath());Why this doesn't really work:
    (a) JMF (com.media.util.Registry) only searches for jmf.properties (which contains the instructions to use the FOBS4JMF plugin) in real folders (i.e. not jars) on the classpath of the local machine. I could extract the jmf.properties to a folder on the local machine, but have no way of making sure that folder would be on the classpath. Calls to "System.getProperty("java.class.path") give varying results - including an empty string on FF/OSX. Even if i could get the classpath somehow, chances are that it wouldn't contain any folders writable under Vista's UAC, which would leave me out of luck.
    JMF also looks for a file called ".jmfdir" in various platform specific locations, and appends the contents of this file to the classpath, so if i could write to that file i'd be golden. This seems like it would work on non windows platforms, because JMF looks for that in "user.home"). However, from what i can tell, on windows, JMF uses a native call to a function called nGetUserHome() to determine where to find .jmfdir - which leads to the second problem...
    (b) the JMF native libraries are loaded through calls to System.loadLibrary(), not System.load(), which means that they have to be on the "java.library.path" in order to be found - and again, I have no way of extracting the libraries to a directory on that path (at least not one writable under Vista UAC). This wouldn't be a problem, as I could pre-load the libraries myself with System.load(), except that JMF throws an exception if it can't find one, and stops trying to do whatever it thinks it needs the library for. Again, not a problem if I use only the FOBS4JMF native code (though i would like to use the DirectAudio renderer on windows) - except that the nGetUserHome() function described above is in a native library (jmutil.dll). So, when com.media.util.Registry.getJMFDir() tries to find ".jmfdir" it first tries to load "jmutil.dll" using System.loadLibrary(). This throws an exception inf "jmutil.dll" is not on the "java.library.path", and com.media.util.Registry.getJMFDir() returns null. Here's the relevant code from com.media.util.Registry.getJMFDir() - with my annotations
    All of these problems are fixable by relatively minor tweaks to the JMF source - but I don't think that's allowed under the SCSL. So if anyone has any, i mean ANY other suggestions, please BRING 'EM ON.
    thanks
    -chris
    EDIT: just for kicks, i checked to see where JMF expects to find .jmfdir on windows - ie the result of nGetUserHome(). At least on XP this seems to be c:\WINDOWS. if it's the same on Vista, then fixing the loadLibrary problem won't help bc I still won't be able to write to this file.
    Edited by: wodenx on May 7, 2010 9:46 AM

    Hi-
    Thanks for responding so quickly.
    As far as the natives go, you might try using the new JNLP embedded applet ability in the plugin2 architecture.I was going to look into that, but decided it wasn't necessary since I can get the FOBS native code to link properly. It's really the registry that's the problem, since without solving that I can't get JMF to USE the FOBS code.
    Can you get it all to work if the JMF installer is invoked? If so, perhaps if you add an installer-desc that calls the normal JMF setup.exe (though that final warning to reboot is both unnecessary and odious).I don't think it would work even with the JMF installer, bc I need to point JMF at the FOBS specific jmf.properties. I might be get it to work by invoking my own installer though, to place my jmf.properties somewhere in the native class path, so that's worth looking at. Thank you. Problem there is that on Vista users would have to elevate to run the applet, which is not ideal.necessary and odious).
    Why do you particularly want to embed media in a web page?The customer may want it. I might be able to convince them to go with JNLP/WebStart, but I think I might have the same problem there. Please correct me if I'm wrong...
    I've also read that there are problems with JMF and JNLP owing to the fact that JMF doesn't recognize the security manager invoked by JNLP, and so gives your program no permissions. Haven't tried it myself yet.
    Thanks again!
    Edited by: wodenx on May 7, 2010 12:07 PM

Maybe you are looking for

  • Images in galleries, when clicked, now replace favicon - bug or "feature?

    When clicking on thumbnails, thus opening full-size images on websites with galleries, the favicon to the left of the URL gets replaced by an icon-sized version of the selected image. This does not happen with IE or Safari. The "feature" is not reall

  • Gmail Account on Apple Devices

    How can all my devices sync up when making changes to my gmail contact account.  When I make a change on any of my Apple devices (iphone, ipad or macbook), it only makes the change on that device and not across all my other devices.  My calendar does

  • Application to pin/keep windows on top?

    Does anyone know an app that will keep/pin one (or multiple) window on top of currently open windows? Afloat doesn't seem to work for many apps, and quite often I need to have few different chat windows going while working on something else in full s

  • Heading issue with the ePub file on Mozilla browser (add in - Epub Reader)

    Hi, I am not able to get the specified font size of headings in the Mozilla browser (add in - Epub Reader) as compare to Adobe digital edition application. Could someone please help me find the way to get the same heading size for the same EPub file

  • Edited Elements file doesn't render

    New LR4 user. After editing in Elements the edited file doesn't render in LR although I can see it as it was before editiing? Help please!