Include many jars for a complex signed applet in html file??

hello
I'd like to know how it's possible to put a signed applet in an html file, that needs many jar files.
I explain myself: I know that to create a signed applet and to put it in an html file, I need to create a Jar file that contains this applet, create a private key with keytool, sign the jar and include it in my html file with the tag <applet code="....." archive="......jar".... />
This works fine if my applet is a simple program that only uses the clases present by default in the jdk.
In my case, I have a big project, with many packages. In one of these packages, I have my applet that uses some classes of the other packages, which use classes from imported jars, such as BouncyCastle, and others...
There is still no problem when I run the applet from the applet viewer.
The problem appears when I put the JAR file with all these classes in the html file: there is a problem since it doesn't know anything of these classes imported from these jars.. It's quite obvious actually.
My question is: how do I do to make the html file aware of these classes? Is there an html tag that allows us to include many jar files? Do I have to decompress all these jars, take all the directories, add them to the directories of my project and create a BIG jar (that's what I did, but it's really dirty, and heavy! (11M))??
Does anyone have an idea about how I can do it?
Thanks for your help
Philippe

11 MB is pretty big for an applet.
Let's say your applet uses java 3d, normally a client would download and
install this seporately, meaning the jars needed end up in lib/ext directory where
any applet can find them.
Check what applets need to be installed (put in lib/ext) and what can be
downloaded:
<object .....
<param name="archive" value="myJar.jar, myOtherjar.jar" />

Similar Messages

  • My iMac, OS 10.7.5, is abnormally slow on start-up, taking many minutes for my password sign-in window to show up.  I've run Disk Permissions and have verified my hard drive and all is in order.  What do I do to start up my Mac in a normal manner?

    My iMac, OS 10.7.5, is abnormally slow on start-up, taking many minutes for my password sign-in window to show up.  I've run Disk Permissions and have verified my hard drive and all is in order.  What do I do to start up my Mac in a normal manner?

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter "BOOT_TIME" (without the quotes) in the search box. Note the timestamps of those log messages, which refer to the times when the system was booted. Now clear the search box and scroll back in the log to the last boot time when you had the problem. Select the messages logged after the boot, during the time something abnormal was happening. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    For example, if the problem is a slow startup taking three minutes, post the messages timestamped within three minutes after the boot time, not before. Please include the BOOT_TIME message at the beginning of the log extract.
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    Still in Console, look under System Diagnostic Reports for crash or panic logs, and post the entire contents of the most recent one, if any. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • Including External JARs for Java Application in OC4J

    Hi Experts,
    Here is my requirement.
    I have developed my Java application using Tomcat Server & Eclipse. In my application I have used some External JARs & imported the classes in my JSP.
    Now that I'm using OC4J Server instead of Tomcat I'v no clue as to where I have copy these External JARs for my application to work.
    I have installed OBIEE-Client which includes OC4J server. The path where I have placed my application is as below
    *"C:\OracleBI\oc4j_bi\j2ee\home\default-web-app"*
    If I run my application the server does not import the classes in the JSP which we include using Import statement using JSP tags (*ex* - <%@ page import = "org.apache.commons.fileupload.*"%>).
    This is the location which I found, where I need to put my Java-J2EE application. This OC4J_BI comes with OBIEE.
    Kindly help me out on where to place these External JARs exact location in OC4J.
    Also let me know if I have to alter any configuration/xml file (if so pls specify the file name & its location).
    Thanks in advance,
    Venky

    You can either include the external libraries in the application, by placing them into WEB-INF/lib, or you can import them into the server as "shared libraries", normally you'd use the "enterprise manager" application to do this. Having loaded a shared library you then add it to the classpath when you're deploying the application.

  • Signed applets (are policy files needed!)

    I have experienced on a number of different machines that a signed applet that the client trusts (via clicking on yes to the prompt asking to trust the applet), is able to access the local resources with NO policy file on the client machine. I'm using JRE 1.4.1_02
    Is this the expected behavior?
    I sure hope it is because how in the world can you install applications to many clients and update their policy file? you can't via the web! BUT why am I reading that you have to have a policy file even if you sign an applet. I want to get rid of using Netscape security model but I can not update many client machine policy files... Please help!!! thanks. Is signing an applet all you have to do to access local machines, I sure hope so! Thanks in advance.

    I've done some more research specifically a very good article at http://developer.java.sun.com/developer/technicalArticles/Security/applets/index.html. I'll try to highlight the more interesting comments that I found. At least for the JRE 1.3 there appears to be a new class loader, sun.plugin.security.PluginClassLoader that allows a signed jar file (once trusted by the client) to have access to local resources.
    Code signed using the private key of the signer can be run on client machines once the public key corresponding to the signer is deemed as trusted on the respective machine.
    Applet security in browsers strives to prevent untrusted applets from performing potentially dangerous operations, while simultaneously allowing optimal access to trusted applets.
    There is no simply way to deploy and use customized policy files, a policy will have to be set by files based on the JRE installation. Customized class loaders or security managers cannot be installed easily.
    Policy files are difficult or at least not very straightforward for normal users, which could be thousands of machines where an applet is deployed.
    The java plug-in (I believe its 1.3 and later) provides a workaround although its recommended to use policy files wherever practical and applicable. (This implies to me that using the plug-in, all that is required is to sign the jar file to have access to local resources).
    RSA-signed applets can be deployed using the Java plug-in. (which can run in an identical way for Netscape and IE).
    In order for a plug-in enhanced browser to trust an applet and grant it all privileges or a set of fine-grained permissions (as specified in a J2EE policy file), the user has to preconfigure his or her cache of trusted signer certificates (the .keystore file in JRE 1.3) to add the applet's signer to it. However, this solution does not scale well if the applet needs to be deployed on thousands of client machines, and may not always be feasible because users may not know in advance who signed the applet that they are trying to run. A NEW CLASS LOADER, sun.plugin.security.PluginClassLoader in the Java Plug-in 1.3, OVERCOMES THE LIMITATIONS MENTIONED ABOVE.
    I hope this helps, I've been looking for this solution for quite some time, trying to understand why singed applets work with no policy files for version 1.4... Talk to you later, Jay.

  • Signed applet and HTML parameters

    I've created a signed applet and everything works fine, except for the fact that i can't add parameters to the applet.
    Without the parameters in the HTML the applet inits and starts and can be used without problems. But when I add paramaters, the applet reports a "class not found exception".
    I used HTML-converter to convert the applet tag to object/embed tags.
    Has anyone had the same problem or knows what I'm doing wrong? I'd really appreciate some help.
    Thanks in advance,
    Erik
    My HTML source:
    <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 = CODE VALUE = "TNA" >
    <PARAM NAME = ARCHIVE VALUE = "TNA.jar" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3.0">
    <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>
    -->

    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>

  • Signed Applet VS. Files

    Hi,
    i signed my applet to access a xml file. That should work so far because the vm doesn't throw AccessDeniedExceptions any longer - as it did, when the applet wasn't signed.
    Now my problem are FileNotFoundExceptions: how the hell do I find that xml-file? It is stored in another folder than the jar-file of my applet. Changing the path in the java code (e.g. "../topics.xml" or "../../topics.xml" etc.) doesn't take effect.
    But it doesn't work either if the xml-file is in the same folder!
    Is there any documentation in which is described how signed jar-applets behave in accessing external files or other resources? It seems, that an applet doesn't work with classpaths in its manifest-file. I tried to use the codebase attribute in the <applet>-tag of my html source, but that was no solution...
    I should also tell you, that the code of the applet works fine with the appletviewer!
    DukeDollar-Hunters... is any one out there who can help me? :-) ...
    ciao, _fLo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I have been passing in a string for a URL to the xml file in my applet with the param tag of the applet's jsp page and then calling getParameter() to get get that string.
    String xmlUrl = this.getParameter("XmlFileUrl");
    URL url = new URL(xmlUrl);
    then when parsing xml I use:
    DocumentBuilderFactory builderFactory = DocumentBuilderFactoryImpl.newInstance();
    builderFactory.setValidating(false);
    DocumentBuilder builder = builderFactory.newDocumentBuilder();
    Document document = builder.parse(url.openStream());
    readXML(document);
    inside jsp code was
    <APPLET
    CODE="com.MyApplet.class"
         WIDTH="600" HEIGHT="500" CODEBASE="http://MyIPAddress:8080/MyProject/applets/MyApplet">
    <PARAM NAME="XmlFileUrl" VALUE="http://MyIPAddress:8080/MyProject/xml/DemInfo.xml">
    </APPLET>
    Oh, I also Had some issues with Tomcat and moved my xml folder out of WEB-INF and left it under the WebContent folder of my project

  • Signing Applets..Policy File

    Hi All,
    I have developed a Applet to read from local hard disk file. I have signed it. Regarding policy file i hv sm confusion.wihtout policy file also it is working. Isn't must to use policy files. If it is must how and where i will install it on other remote machines.
    Reg Certificates, whether we hv to manually give a link in our html. or anyother way is there to let IE automatically pop up that "Plugin Window" asking abt certficate(Grant,deny..\)
    Lemme me know the details..

    I have followed the instuction and signed all other libraries and I have encountered a runtime error in IE.
    The title of the message is Microsoft Visual C++ Runtime Library.
    The content is
    Runtime error!!
    Program: C:\program files\internet exploer\iexplorer.exe
    Abnormal program termination.
    I have tested serval version of IE and Java plug-in. It include:
    IE 6.0 sp1 with JRE 1.3.1_10
    IE 6.0 sp1 with JRE 1.3.1_06
    IE 5.5 sp2 with JRE 1.3.1_05
    Could someone can help me? Thanks!!

  • JRE 1.4.x Plugin - Signed Applets and Weird Behaviour (Policy)

    Hello.
    I have recently experienced some strange behaviour related to signed applets and policy files in JRE 1.4.2-b28 ( a friend got the same behaviour in a flavour of 1.4.1-xx as well ). Both tests were on Windows 2000 Professional platforms.
    Initially my unsigned applet, which attempts socket connections to a server different from the download location, fails with security exceptions ( as expected ). Then I did the following to sign the applet jar and configure my environment
    Steps: 1) Import "trusted CA" certificate into ${java.home}/lib/security/cacerts. (JRE home outside the JDK)
    2) Signed the jar using jarsigner and a certificate generated from the "trusted CA" (Entrust CA and certificate).
    3) Imported the signing certificate into the Java plugin using import in the plugin control panel.
    4) Created a new keystore (keytool,jks) and imported the signing certificate into the keystore with alias "developer". The keystore is stored in the user home as .keystore.
    5) Created a .java.policy for the user and attaching the keystore in 4) to it. ( also stored in user home ).
    6) Used the policy tool to grant socketpermissions to the specific codebase ( testing with file:/C:/test/* initially ) signed by "developer"
    After this, when I ran the test page under IE 5.5SP2 and Netscape 7.1 it worked without any security exception. Ditto for using the appletviewer and the policy file I created for the user.
    The weird part occurred when I removed the policy entry from the user policy file. After doing this, Netscape and IE still allow the applet to execute - somehow remembering that it was granted permissions at some point. The appletviewer does not allow it to execute, generating security exceptions.
    It appears the old policy is being cached somewhere, but I cannot find where. If I replace the applet jar with an unsigned version it does fail in IE and Netscape. I tried cleaning the plugin cache and removing the "deployment.certs" files related to the users but still get the same behaviour.
    Does anyone know where the old policy information is being stored ? Does anyone know how to revoke the permissions so that I am restored to my original base environment ( no permissions for "designer" signed applets ) ? Would attempting to utilize the AccessController.doPriveleged( xxxx ) operations in JDK 1.4 avoid all of this confusion with policy files, keystores and certificate storage ? After all the messing about I would like a zero-footprint alternative ( or minimzed footprint anyway ).
    Any ideas would be most welcome.
    Regards,
    James.

    Hello Again.
    I am either enlightened or confused at this point. I found that as long as all of my related Jars are signed ( even by self-signed certificates ) I am granted SocketPermissions for calls outside of the originating server. Unsigned code is refused, but even when the Jars were signed using a self-signed certificate the Socket calls were allowed.
    Am I experiencing the appropriate behaviour in this case ( which would mean not having to utilize policy files to distribute an applet that uses calls to arbitrary servers - e.g. JavaMail ) or am I suffering from something damaged in my environment ?
    It has been a long time since I played with signed applets and I am having difficulty determining what operations require policy file entries/AccessController.doPrivileged() calls and which are granted when a user elects to trust a signed applet without policy.
    Any assistance in clearing up my confusion would be appreciated.
    Regards,
    James.

  • Signed applet to open local file problem with IE6 / Firefox

    Hello
    I have a signed applet to open a local file, with this code :
    try{
       URL destination=null;
       File f=new File(adresse);
       destination=f.toURL();
       AppletContext ac=applet.getAppletContext();
       ac.showDocument(destination,"_blank");
    catch (MalformedURLException e)
       System.out.println(e.toString());
    ...It works perfectly with Netscape 7.01 and IE 5.5, but not with IE6.0 or Firefox 1.0...
    (using SUN JVM 1.4.2_04), and there is no trace/error message
    With a http link, it works for all browsers...
    try{
       URL destination=new URL("http://my.site/mypage.htm");
       AppletContext ac=applet.getAppletContext();
       ac.showDocument(destination,"_blank");
    catch (MalformedURLException e)
       System.out.println(e.toString());
    ...Any idea ??
    Thanks

    Hello again
    There's something I don't undestand...
    java applet code
    import java.applet.*;
    import java.net.*;
    public class test extends Applet {
         public void init() {
              try {          
                   String path = "file:/C:/Temp/";
                   URL destination = new URL(new URL(path) ,"test.jpg");
                   System.out.println("URL is now: " + destination.getPath() );          
                   AppletContext ac = this.getAppletContext();
                   ac.showDocument(destination, "_blank");
              } catch (Exception e) {
                   e.printStackTrace();
    html code
    <html>
    <head>
    <title>test</title>
    </head>
    <body>
    <applet CODE = "test.class" ARCHIVE = "sTest.jar" width=350 height=200></applet>
    </body>
    </html>
    Signature
    javac -classpath ".;D:\Program Files\Java\j2re1.4.2_04\lib\plugin.jar" test.java
    keytool -genkey -keystore mag -keyalg rsa -alias harm -validity 3600 -keypass password -storepass password
    jar cf0 test.jar *.class
    jarsigner -keystore mag -storepass password -keypass password -signedjar sTest.jar test.jar harm With a debug the signature looks good in the logs (translation by google, not sure of the correct words...)
    The checking of the certificate using the certificates CA root failed
    Piled up method
    Unstacked method
    Selected user: 0
    The user granted the rights of access to the code for this session only
    Addition of the certificate in the storage section of the certificates of session JPI
    Certificate added in the storage section of the certificates of session JPI
    Recording of the certificates in the storage section of the certificates of session JPI
    Certificates recorded in the storage section of the certificates of session JPI
    URL is now: /C:/Temp/test.jpg
    Javascript: Activated UniversalBrowserRead
    Javascript: Activated UniversalJavaPermission
    What are the 2 last line ?? (appears only in firefox, not in IE55...don't have another browser yet 'cause my graphic card and motherboard are out of order :-(
    Why in firefox, in the javascript console, there is a "message" (again translation by google...) but everything is alright in the java console ??
    Error of safety: the contents located at http://www.distantserver.com/Demo/test/test.html cannot charge of data or establish a bond towards file:///C:/Temp/test.jpg.
    Thanks in advance (and sorry if I only don't understand something from your link because of my english level...)

  • Self signed Applet - still getting Security Exception...

    Hi everyone...
    I m new to Java Mail... Nd I m developing a Applet to send mail from my Gmail account, nd I used keytool, jarsigner to Self sign the applet. Nd I wrote a Html page and when calling my applet method using javascript, I m having Security Exception... And I m using Java 1.5 (i.e., J2SE 5)
    Here is the sample of my code...
    --------- MyMail.java -----------
    import javax.mail.*;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    And all neccessory packages are imported....
    public class MyMail extends JApplet
         String server = "smtp.gmail.com";
         String username;
         String password;
         String fromAddres="";
         String toAddres="";
         Other Variable declaration goes here........
    Session ses;
    Transport tr;
    MimeMessage msg;
         public void init() //For testing purpose
              doLogin("username","password"); //My account details
         public void doLogin(String user,String pass)
              username = user;
              password = pass;
              boolean success;
              fromAddres = user+"@gmail.com";
              toAddres = "[email protected]";
              subject = "TEst SubJect";
              body = "This is Test Mail";
              success = doAuthentication();
              if(success)
                   setHeaders(server,username,password,fromAddres,toAddres,cc,bcc,htmlFormat,subject,body);
                   sendMail(ses);
                   doLogout();
         public void doLogout()
              //Deals with the logout from my account
         public boolean doAuthentication()
              //Deals with the authentication of my account
              // Setting properties, creating a session, getting transport object...
              //and returns true if authentication is success, false if not.
         public void setHeaders(String server, String username, String password, String fromAddress, String toAddress, String cc, String bcc, boolean htmlFormat, String subject, String body)
              //Sets the headers fields for the message (recieved through arguments)
         public void sendMail(Session ses)
              //Deals with sending mail
    class MyPasswordAuthenticator extends Authenticator
         //Deals with the authentication of my account
    ---------- MyMail.html -----------
    <html>
    <head>
    <script language=javascript>
    function sendmail()
    document.MyMail.doLogin("username","password"); //my account details
    </script>
    </head>
    <body>
    <input type=button name=but value=Send mail onclick=sendmail()>
    <applet name=MyMail code=MyMail.class
    archive=mail.jar,activation.jar,mailplus.jar width=0 height=0>
    </applet>
    </body>
    </html>
    And the applet is Self signed using the tools supplied from Java SDK...
    it got signed...
    And as the applet got loaded when i opend the MyMail.html, as i called the doLogin(..,..) in init() it is sending mail successfully...
    The problem is.... As I given the action for my button to send mail (by calling java method from java script i.e., calling doLogin() when the button clicked) I m getting Security Exception
    So...anyone plz tell me the solution....
    Thnx in advance....
    - Kanta

    http://www.google.nl/search?hl=nl&q=site%3Asun.com+javascript+signed+applet&btnG=Google+zoeken&meta=
    DoPrivileged would solve your problem but I've seen some cases where the
    threaded (link mentioned below second post) mothod is the only way it'll work.
    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
    Still problems?
    A Full trace might help us out:
    http://forum.java.sun.com/thread.jspa?threadID=656028

  • Signed applets won't run @ web, only locally

    Hey, all elitist java folk, here is one for you:
    I have succeded in creating a signed, and an un-signed java applet - both run well locally. The signed applet, writes to a local file.
    Both are merely proof of concept.
    So, here is the deal:
    I upload both to a webserver (one of those where you get 50Mb for free) via ftp (not ASCII, binary transfer), and only the unsigned will run in my browsers (Opera, FF, MSIE tested).
    The signed one writes to the screen: "Could not instantiate."
    I belive the problem lies in the HTML, which is very basic but still works locally. I don't have any clsid-thingy, is this nessecary? Where do I read about this?
    HTML that (should) load the signed applet:
    <html>
    <applet code="localfile.class" archive="localfile.jar"  width="300" height="300">
    </applet>
    </body>
    </html>As previously said, the unsigned applet work both from the web and locally, so I won't post any more html here...
    Btw, I am not interessed in editing any policy-file; my signed applet should work "out-of-the-box" for any java-enabled browser on the Internet.
    All I want is for the browser to load the signed java applet, ask user for certificate confirmation, and run it... Just like with http://jupload.sourceforge.net/applet-basic.html , which also access local filesystem.

    If you open the Java Console what does it say?
    There shouldn't be any difference in loading the applet locally or from the webserver... presuming the HTML and jar files and classnames and stuff are all correct relative to both locations.

  • Runtime in sign applet (IE)

    i wrote a sign applet calling an execution file (aaa.exe).
    Is it possible to do that combining this applet( x.class )
    and the execution file into a cab file(for building a sign applet)
    and still work when I use Runtime.exec("aaa.exe").
    If it is NOT possible to do so,
    is there any other way to do this?

    See it depends on ur requirements.Let me know wheather u want to run the applet in Browse or as an application through appletviewer.
    If case is first,then it is not possible.Applet can not read or do any operation with local system or where it is runing.Java provide a high level of security.How can you read ,write or execute any file through applet which is running in Browser.Then it will be easy to write a applet to crash your system files is n't it!! and more or less this applet will act as virus which can play with your system.Java does allow this.
    Let me know ur exact requirements.

  • Signing Applets with javakey

    Hi All,
    I have an Intranet application that uses a signed applet to access files on the client. It all works fine using JDK1.3 or 1.4 and signing the Applet with keytool.
    I now need to support an older server that only has JDK1.1 available. Does anyone have any tips on how to sign my Applet with javakey?
    Also what JRE version should be installed on the clients?
    Thanks in advance.
    P.S. I have followed the example at http://java.sun.com/security/usingJavakey.html but not got it to work.

    try this..
    http://forums.java.sun.com/thread.jsp?forum=63&thread=132769

  • 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.

  • Error while calling applet in HTML in SAP NWDS

    Hi,
    We have written a java code with Main method and we are trying to run it on web. So we have written another piece of HTML code where we are calling the othe program with applet. But getting below error.
    Below is exce[ption I am getting while running jree charts made in java :
    Java Plug-in 1.6.0_24
    Using JRE version 1.6.0_24-b07 Java HotSpot(TM) Client VM
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    java.lang.reflect.InvocationTargetException
    at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.runOnEDT(Unknown Source)
    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.RuntimeException: java.lang.InstantiationException: org.jfree.chart.demo.BarChartDemo
    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.InstantiationException: org.jfree.chart.demo.BarChartDemo
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    ... 15 more
    Exception: java.lang.reflect.InvocationTargetException
    Below is html code run to call applets :
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "" title="http://www.w3.org/TR/html4/loose.dtd">" class="link">http://www.w3.org/TR/html4/loose.dtd">
    (http://www.w3.org/TR/html4/loose.dtd)
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Hello</title>
    </head>
    <body>
    <applet code=org.jfree.chart.demo.BarChartDemo archive="src.jar" width="320" height="120"></applet>
    </body>
    </html>
    Please suggest.
    Regards
    Agamani

    Hi,
    Though there are a lot of importing parameters, you should give only one structure for outtable, and read as index 1 and index 2.
    FORM GET_SPRAS TABLES intable   STRUCTURE itcsy
                                              outtable  STRUCTURE itcsy.
      DATA: lv_kunnr LIKE kna1-kunnr.
      CLEAR: GV_SPRAS.
      lv_kunnr = intable-value.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = lv_kunnr
        IMPORTING
          output = lv_kunnr.
      SELECT SINGLE LAND1 SPRAS INTO (gv_land1, gv_spras) FROM KNA1
        WHERE KUNNR = lv_kunnr.
      IF sy-subrc = 0.
        READ TABLE outtable INDEX 1.
        outtable-value = gv_spras.
        MODIFY outtable INDEX 1.
        READ TABLE outtable INDEX 2.
        outtable-value = gv_land1.
        MODIFY outtable INDEX 2.
      ENDIF.
      IF gv_land1 EQ 'DE'.
        CLEAR: GV_LAND1,
               GV_SPRAS.
      ENDIF.
    ENDFORM.
    Edited by: Srinivas Kalluri on Mar 30, 2009 5:00 AM
    Edited by: Srinivas Kalluri on Mar 30, 2009 5:10 AM

Maybe you are looking for

  • How can you transfer data from one ipod to another ?

    How can you transfer data from one ipod to another ipod ?

  • TIFF thumbnails do not enlarge in either preview pane or content pane?

    I have CS6 Bridge and Photoshop on a new 2014 iMac. The thumbnail size as viewed on screen is a limited size (around 2cm x 1cm).  Enlarging the preview pane just increases the space around the thumbnail rather than the thumbnail increasing to fill th

  • Viewing downloaded tv series from itunes

    I downloaded a tv series from itunes, and moved it to my ipad, but I can't find it when I go to look on the actual ipad? It's not in ipod or videos. Any help would be appreciated!

  • Color in photoshop different then in aperture

    i had to notice that raw files adjusted in aperture always look different in photoshop... i work in a completely colormanaged environment and i really don't have any problems printing, but when i export files and open them in PS, there is a definite

  • Evaluation path Error

    Hi All, I have configured Infotype (IT1513)  for Job (C ) and specified the Time constraint to 2. When iam trying to crate this info type through po03 it is giving error        "Evaluation path  is not in Table T778A". How do i solve this. Quick help