Print from applet, signed jar

Hi all
Have a signed applet that runs under IE 6, java 1.5. The applet is basically used for printing purpose.
My problem is that the applet shows a dialog box "Applet would like to print. Do you want to proceed?"
How can I get rid of the dialog box?
I don't want to change the Java file.
Thanks in advance

An Applet runs in a sandbox which without proper authentication, will not allow any actions outside the sandbox, i.e. on the local filesystem.
You cannot print from an unsigned applet.
The signing process is very simple using Jarsigner and the Java Plugin.
You can generate your own certificates too, no need to purchase one.

Similar Messages

  • Printing from applet

    I have a java 1.1 applet, which has been printing ok from IE, since I moved up to JDK1.4.0_01, the print dialog comes up as usual but after clicking ok, the answereing yes to the allow java to print question, the applet hangs. When I've turned on the exception reporting and looked at the console, it reports the following exception, printing work when using appletviewer. Does anyone have any ideas what's the solution is to this, the line of code it's executing at the time is
    printjob = oolkit.getPrintJobframe, "Print", oPrinterProperties);
    sun.misc.ServiceConfigurationError: javax.print.PrintServiceLookup: : java.io.FileNotFoundException: http://localhost/META-INF/services/javax.print.PrintServiceLookup
         at sun.misc.Service.fail(Service.java:129)
         at sun.misc.Service.parse(Service.java:208)
         at sun.misc.Service.access$100(Service.java:111)
         at sun.misc.Service$LazyIterator.hasNext(Service.java:257)
         at javax.print.PrintServiceLookup$1.run(PrintServiceLookup.java:326)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.print.PrintServiceLookup.getAllLookupServices(PrintServiceLookup.java:320)
         at javax.print.PrintServiceLookup.lookupDefaultPrintService(PrintServiceLookup.java:162)
         at sun.print.RasterPrinterJob.getPrintService(RasterPrinterJob.java:348)
         at sun.awt.windows.WPrinterJob.getPrintService(WPrinterJob.java:408)
         at sun.print.PrintJob2D.findNamedPrintService(PrintJob2D.java:187)
         at sun.print.PrintJob2D.copyAttributes(PrintJob2D.java:223)
         at sun.print.PrintJob2D.printDialog(PrintJob2D.java:176)
         at sun.awt.windows.WToolkit.getPrintJob(WToolkit.java:600)
         at sun.awt.windows.WToolkit.getPrintJob(WToolkit.java:586)
         at PrintingChartApplet.printChart(PrintingChartApplet.java:67)
         at PrintingChartApplet.actionPerformed(PrintingChartApplet.java:53)
         at java.awt.Button.processActionEvent(Button.java:381)
         at java.awt.Button.processEvent(Button.java:350)
         at java.awt.Component.dispatchEventImpl(Component.java:3526)
         at java.awt.Component.dispatchEvent(Component.java:3367)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)

    I also ran into this problem recently and I think I've figured out basically what's happening. It only happens when the applet is served by Tomcat and certain other web application servers. When the applet is launched by a simple HTML page from a web server, it is able to print without any exceptions being thrown.
    In one of our applications, we have a servlet that downloads an applet to the client. When that applet calls 'PrinterJob.print', the JDK 1.4 implementation of that method on the client looks up the default 'PrintService'. To do so, it indirectly uses the class loader to get some optional configuration file (I don't know the details). That configuration file isn't in the applet's JAR file, so the class loader looks for it in the same place the JAR file came from: the server. Our servlet gets the request for the configuration file but the file isn't on the server either, so it returns a 404 error.
    Here's where things go wrong. If the 404 error were sent back correctly, printing would proceed normally since the configuration file is optional. However, instead of calling 'HttpServletResponse.sendError (SC_NOT_FOUND)', the servlet calls 'HttpServletResponse.setStatus (SC_NOT_FOUND)'. I'm not sure why, but this response isn't seen by the client as a 404 error, so the body of the response is treated as the configuration file. Parsing of the body fails and the 'ServiceConfigurationError' is thrown.
    We changed our servlet so that it calls 'sendError' and that fixed the 'ServiceConfigurationError' problem.
    Nobody has mentioned servlets (or JSPs) being involved in their situations, but maybe there is a similar root cause. If the server is somehow not returning a 404 response, the 'PrintService' code on the client will try to parse that response and throw an error.

  • Problem occuring when extending classes coming from 2 signed JAR

    Hi everyone,
    I have 2 signed jar called "base_signed.jar" and "extended_signed.jar" using keytool with a testing certificate generated at runtime. All goes well because with both signed JARs I can use the URLClassLoader without any java.security.AccessControlException exception.
    But the first JAR contains abstract class B, the latter JAR contains a concrete class A.
    The problem occurs when I try to instantiate some class A coming from "extended_signed.jar" using Class.forName("blablaclassA").newInstance() and occurs only if this class A extends some other abstract class B contained inside "base_signed.jar" .
    Pratically if the class A is casted as its common JVM ancestor of B (JInternalFrame) all goes well, otherwise if I try to cast A using its direct ancestor B, I receive the following exception:
    network: Connessione a http://www.orion.lan/~antares/it/weev/wipidea/plugins/MeteoradarArpavPlugin$7.class con proxy=DIRECT
    Exception in thread "AWT-EventQueue-35" java.lang.ClassCastException: it.weev.wipidea.plugins.MeteoradarArpavPlugin cannot be cast to it.weev.wipidea.base.AWipideaPlugin
         at it.weev.wipidea.base.PluginLoader.loadNetworkPlugin(Unknown Source)
         at it.weev.wipidea.applet.WipideaApplet.loadPlugin(Unknown Source)
         at it.weev.wipidea.applet.WipideaApplet$1.actionPerformed(Unknown Source)
         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.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)
    network: Voce cache non trovata [url: http://www.orion.lan/~antares/it/weev/wipidea/base/PluginLoader.class, versione: null]
    network: Connessione a http://www.orion.lan/~antares/it/weev/wipidea/base/PluginLoader.class con proxy=DIRECT
    network: Voce cache non trovata [url: http://www.orion.lan/~antares/it/weev/wipidea/base/network-classpath.class, versione: null]
    ---The strange thing is that if I don't sign both JARs the class A is casted on B without any exception, could for security reason like hash or other? Ideally I need all JAR signed only because I plan to load classes from all over the net, but seems that URLClassLoader throws an AccessControlException when called.
    Anyway just now I solve all using only the common JVM ancestor of A and B, but what could be the final solution?
    Thanks, bye.

    Hi Sean,
    The file in question has been signed which causes issues in both OSB directly and in Eclipse when we do an import into that tool first.Can you let us know what issues you faced? Any errors? If yes, please post the same here.
    Regards,
    Anuj
    Edited by: Anuj Dwivedi on Feb 23, 2011 9:10 PM

  • Printing from applet hangs

    I'm trying to create an applet that can print a graphic. I have a single button and the event seems to fire when clicked. I get the security warning asking me if I want to print. I click yes and it usually pops up again and I hit yes again and then it hangs. My end goal is to print a coupon image from the browser without the print dialog so that multiple copies cannot be printed. Yes, I've heard of photo copiers but evidently the client is fine with that. At this point I'm just trying to get something to print period from the applet. Any ideas?
         public void PrintCoupon2()
              try {
              PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
              pras.add(new Copies(1));
              PrintService pss[] = PrintServiceLookup.lookupPrintServices(DocFlavor.URL.JPEG, pras);
              if (pss.length == 0) {
                   throw new RuntimeException("No printer services available.");
              PrintService ps = pss[0];
              System.out.println("Printing to " + ps);
              DocPrintJob job = ps.createPrintJob();
                   URL url = new URL("http://www.mydomain.com/images/test.jpg");
                   Doc doc = new SimpleDoc(url, javax.print.DocFlavor.URL.JPEG, null);
              //FileInputStream fin = new FileInputStream("IMG_0711.JPG");
              //Doc doc = new SimpleDoc(fin, DocFlavor.INPUT_STREAM.JPEG, null);
              job.print(doc, pras);
         } catch (IOException ie) {
              ie.printStackTrace();
         } catch (PrintException pe) {
              pe.printStackTrace();
         }

    I also ran into this problem recently and I think I've figured out basically what's happening. It only happens when the applet is served by Tomcat and certain other web application servers. When the applet is launched by a simple HTML page from a web server, it is able to print without any exceptions being thrown.
    In one of our applications, we have a servlet that downloads an applet to the client. When that applet calls 'PrinterJob.print', the JDK 1.4 implementation of that method on the client looks up the default 'PrintService'. To do so, it indirectly uses the class loader to get some optional configuration file (I don't know the details). That configuration file isn't in the applet's JAR file, so the class loader looks for it in the same place the JAR file came from: the server. Our servlet gets the request for the configuration file but the file isn't on the server either, so it returns a 404 error.
    Here's where things go wrong. If the 404 error were sent back correctly, printing would proceed normally since the configuration file is optional. However, instead of calling 'HttpServletResponse.sendError (SC_NOT_FOUND)', the servlet calls 'HttpServletResponse.setStatus (SC_NOT_FOUND)'. I'm not sure why, but this response isn't seen by the client as a 404 error, so the body of the response is treated as the configuration file. Parsing of the body fails and the 'ServiceConfigurationError' is thrown.
    We changed our servlet so that it calls 'sendError' and that fixed the 'ServiceConfigurationError' problem.
    Nobody has mentioned servlets (or JSPs) being involved in their situations, but maybe there is a similar root cause. If the server is somehow not returning a 404 response, the 'PrintService' code on the client will try to parse that response and throw an error.

  • Print From Applet

    Can I print from an Applet without signing it or messing about with the policy file? A simple enough question but one I haven'e been able to find a definitive answer for. If possible I'd like to avoid popping up a new browser window with the document to be printed.

    An Applet runs in a sandbox which without proper authentication, will not allow any actions outside the sandbox, i.e. on the local filesystem.
    You cannot print from an unsigned applet.
    The signing process is very simple using Jarsigner and the Java Plugin.
    You can generate your own certificates too, no need to purchase one.

  • Applet Signed JAR Problem

    Hi Members,
    * I am trying to uplaod a file to FTP server using apache API in Applet...
    * I have Signed the JAR(TestApplet.jar) file by the following steps,
    Generated the keytool for my created JAR file by the following command,
    keytool -genkey -alias TestApplet -validity 365
    Signed the JAR file by the following command,
    jarsigner TestApplet.jar TestApplet
    * The following is my HTML code to call my signed JAR file,
    +<HTML>+
    +<HEAD>+
    +</HEAD>+
    +<BODY>+
    +<APPLET ALIGN="CENTER" CODE="AppletExample.class" archive="AppletExample.jar" WIDTH="800" HEIGHT="500"></APPLET>+
    +</BODY>+
    +</HTML>+
    * The below is the my code in applet to upload a file to FTP server,
         public void upload(){
              try {
                   FTPClient client = new FTPClient();
                   FileInputStream fis = null;
                   client.connect("ftp.tnq.co.in");
                   client.login("workflow", "workflow");
                   String filename = "D:/Temp/upload.txt";
                   fis = new FileInputStream(filename);
                   client.storeFile("/home/workflow/TEST/javaupload.txt", fis);
                   client.logout();
                   fis.close();
                   System.out.println("File Uploaded Susccessfully.........");
              } catch (SocketException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (FileNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         }* The File is successfully uploaded to FTP server machine while running it in Eclipse IDE, but not in browser(Mozilla FireFox)
    * When i run it by browser it throws the following exception,
    Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.net.SocketPermission ftp.tnq.co.in resolve)
         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.checkConnect(Unknown Source)
         at java.net.InetAddress.getAllByName0(Unknown Source)
         at java.net.InetAddress.getAllByName(Unknown Source)
         at java.net.InetAddress.getAllByName(Unknown Source)
         at java.net.InetAddress.getByName(Unknown Source)
         at java.net.InetSocketAddress.<init>(Unknown Source)
         at org.apache.commons.net.SocketClient.connect(SocketClient.java:176)
         at org.apache.commons.net.SocketClient.connect(SocketClient.java:268)
         at AppletExample.upload(AppletExample.java:88)
         at AppletExample.actionPerformed(AppletExample.java:111)
         at java.awt.Button.processActionEvent(Unknown Source)
         at java.awt.Button.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(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)* Please let me know, why it is not running in browser....?
    * Thanks in advance
    Regards,
    JavaImran

    * Thanks for your thoughts....
    * As sabre said to me sign external also, so that now i did the following upload program by sun API only(now there is no external API jar file)
    public void upload( String ftpServer, String user, String password,
             String fileName, File source ) throws MalformedURLException,
             IOException
          if (ftpServer != null && fileName != null && source != null)
             StringBuffer sb = new StringBuffer( "ftp://" );
             // check for authentication else assume its anonymous access.
             if (user != null && password != null)
                sb.append( user );
                sb.append( ':' );
                sb.append( password );
                sb.append( '@' );
             sb.append( ftpServer );
             sb.append( '/' );
             sb.append( fileName );
              * type ==> a=ASCII mode, i=image (binary) mode, d= file directory
              * listing
             sb.append( ";type=i" );
             BufferedInputStream bis = null;
             BufferedOutputStream bos = null;
             try
                URL url = new URL( sb.toString() );
                URLConnection urlc = url.openConnection();
                urlc.setDoOutput(true);
                //urlc.setUseCaches(false);
                bos = new BufferedOutputStream( urlc.getOutputStream() );
                bis = new BufferedInputStream( new FileInputStream( source ) );
                int i;
                // read byte by byte until end of stream
                while ((i = bis.read()) != -1)
                   bos.write( i );
             finally
                if (bis != null)
                   try
                      bis.close();
                   catch (IOException ioe)
                      ioe.printStackTrace();
                if (bos != null)
                   try
                      bos.close();
                   catch (IOException ioe)
                      ioe.printStackTrace();
          else
             System.out.println( "Input not available." );
       }* Now also, it is executing well in eclipse, but not in browser both IE and Mozilla2.0
    * I got the following error, when i run it in browser,
    java.net.ProtocolException: cannot write to a URLConnection if doOutput=false - call setDoOutput(true)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
         at sun.net.www.protocol.ftp.FtpURLConnection.getOutputStream(Unknown Source)
         at FileUploadAndDownload.upload(FileUploadAndDownload.java:76)
         at UploadAndDownload.actionPerformed(UploadAndDownload.java:67)
         at java.awt.Button.processActionEvent(Unknown Source)
         at java.awt.Button.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(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)* The erroe gives me to set setDoOutput(true) as true..., i did like that only in my coding........but throws erroe..... Why that...?
    * Please let me know your suggestions........
    Thanks and Regards,
    JavaImran

  • Print from applet running in IE5.5

    Application is standalone and can be used as applet as well. If it works as standalone application everything works fine. When I put it on a Web server and try to run it as applet from within IE5.5 it hangs. The problem is in the part of code that invokes printing, without it applet works fine.
    I know the problem is that applet can�t invoke printing if it isn�t signed but in that case it should throws exception not hangs at the very beginning. Also, applet can�t be closed without closing IE5.5.
    public void printGraph() {
    PageAttributes pa = new PageAttributes();
    JobAttributes ja = new JobAttributes();
    pa.setOrientationRequested(PageAttributes.OrientationRequestedType.LANDSCAPE);
    pa.setOrigin(PageAttributes.OriginType.PRINTABLE);
    PrintJob printJob = getToolkit().getPrintJob(this, graph.name, ja, pa);
    if(printJob != null) {
    int xmargin = 30;
    int ymargin = 30;
    Dimension printArea = printJob.getPageDimension();
    printArea.width -= xmargin;
    printArea.height -= ymargin;
    for(int i=0; i<ja.getCopies(); i++) {
    Graphics g = printJob.getGraphics();
    if( g != null) {
    graph.print(g, printArea, xmargin, ymargin);
    g.dispose();
    printJob.end();
    public void actionPerformed(ActionEvent event) {
    String command = event.getActionCommand();
    Object source = event.getSource();
    int index;
    } else if (command == "Print") {
    try {
    SecurityManager sm = System.getSecurityManager();
    if( sm != null) sm.checkPrintJobAccess();
    printGraph();
    } catch (SecurityException e) {
    System.err.println("Printing is not allowed.");
    I hope someone knows what is the problem.
    Best regards
    Goran

    The problem is in the version of java (1.1.4) IE5.5 supports by default on WIN2K platform.
    This version doesn't support the PageAttributes and JobAttributes classes and method getPrintJob(Frame f, String name, JobAttributes ja, PageAttributes pa).
    The getPrintJob(Frame f, String name, Properties pr) method that is supported since jdk 1.1 can be used instead
    Sorry I didn�t mention os platform and java version.

  • Printing From Applet Problem

    Hi,
    I created this simple applet that has a combox with all installed printers, a textare (where the user will type whatever he wants to print) and a button that is suppose to print the textarea content to the selected printer. It works fine if a run the applet itself, but when I load it to a webpage, the applet runs nicely, it asks me for permission to access the printer but when I click the "Print Now", it just doens't print :(
    Thanks a lot,
    Dirso
    import java.awt.event.*;
    import javax.swing.*;
    import javax.print.*;
    import javax.print.attribute.*;
    import javax.print.attribute.standard.*;
    * @author Dirso
    public class JRPrinter extends JApplet implements ActionListener {
         JComboBox cbPrinters = new JComboBox();
         PrintService[] services = null;
         JTextArea ta = new JTextArea();
         /* (non-Javadoc)
          * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
         @Override
         public void actionPerformed(ActionEvent arg0) {
              // TODO Auto-generated method stub
              PrintService psZebra = services[cbPrinters.getSelectedIndex()];
              DocPrintJob job = psZebra.createPrintJob();
              byte[] by = ta.getText().getBytes();
              DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
              Doc doc = new SimpleDoc(by, flavor, null);
              try
                   job.print(doc, null);
              }catch (PrintException e3) {
                   ta.setText(e3.getMessage());
         public void init() {
              // cria as impressoras
              services = PrintServiceLookup.lookupPrintServices(null, null);
              for (int i = 0; i < services.length; i++) {
                   PrintServiceAttribute attr = services.getAttribute(PrinterName.class);
                   cbPrinters.addItem(((PrinterName)attr).getValue());
              // crie o botao de imprimir
              JButton button = new JButton("Print Now");
              button.addActionListener( this );
              JPanel p2 = new JPanel();
              p2.add(cbPrinters);
              p2.add( button );
              getContentPane().add( "North", p2 );
              //getContentPane().add( "North", p1 );
              getContentPane().add( "Center", new JScrollPane(ta) );

    Well, I made a .jar file including that .class and a java.policy.applet with the following code and finally I signed it... Looks like it worked, I'll have more answers tomorrow and I'll let you all know about.
    grant {
      permission java.security.AllPermission;
    };Best Regards,
    Dirso

  • Printing from Applet with JRE1.5

    My customers want to upgrade to JRE1.5, but I have been unable to
    make any of my Applets work with JRE1.5....
    Q.What have they changed????
    // Print receipt
    void Print() {
    DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PRINTABLE;
    PrintService printService = PrintServiceLookup.lookupDefaultPrintService();
    DocPrintJob job = printService.createPrintJob();
    PrintJobListener pjlistener = new PrintJobAdapter() {
    public void printDataTransferCompleted(PrintJobEvent e) {
    return;
    job.addPrintJobListener(pjlistener);
    PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
    // pras.add(new Copies(2));
    pras.add(new JobName("MyJob",null));
    DocAttributeSet das = new HashDocAttributeSet();
    Doc doc = new SimpleDoc(Print_Area, flavor, das);
    try {
    job.print(doc, pras);
    } catch (PrintException pe) {
    pe.printStackTrace();
    }

    yes My Ipad will not see my printer on wifi it was working 100% till the IOS 5 update and apple don't seem to be looking into this fault.
    If they want folk to not buy apple stuff there going the right way about it every update sees a new problem.
    it is used in the office so how they can't notice that the print function is not working.
    or should I say not seeing the printer what else is screwd up.
    unhappy user here

  • Cannot interactively use VNC when started from a signed jar

    I wrote a Java wrapper class to run a shell command to start a VNC client. Then signed it and started it using web start. In the jnlp file, I granted all permission. I could start the vnc viewer successfully but the issue is that the mouse and keyboard were disabled, so I couldn't intect with the applications. Anythought on it? Thanks in advance.

    If I start it using from command line, javaws or as a web link, the keyboard/mouse didn't work. It might be security permission related.
    Edited by: gao4321 on Jul 10, 2008 12:26 PM

  • Turning off jar cache causes classnotfound with signed jar files

    Hi,
    I have a problem with applet signed jars when the java cache is turned off.
    With the cache turned off, I get a class not found for the first class it attempts to use from the signed jar file from an applet.
    If I turn the jar caching on, all works perfectly with no other changes.
    Anyone have any ideas? This is java 6u16.
    Thanks

    jkc532 wrote:
    .. Is the fact that the CachedJarFile class doesn't attempt to reload the resource when it can't retrieve it from MemoryCache a bug? From your comprehensive investigation and report, it seems so to me.
    ..I've dug as deep as I can on this and I'm at wits end, does anybody have any ideas?Just after read the summary I was tired, so I have some understanding of the effort you have already invested in this (the 'wits' you have already spent). I think you should raise a bug report and seek Oracle's response.

  • Navigating between applets from the same signed jar (trusted CA) gives err

    See [http://www.chrisnewland.com/java-7-update-21-signedunsigned-error-switching-between-applets-in-the-same-signed-jar-trusted-ca-339] for my investigations so far.
    Clicking a link to navigate between applets contained in the same signed jar (signed by a trusted CA) pops up an error dialog complaining about a signed/unsigned code mix.
    Loading each applet in a fresh browser works fine.
    If you click from applet 1 to applet 2 via a non-applet page then both applets run without problem.
    [EDIT: This is behaviour is new to 7u21]
    Edited by: Chris Newland on Apr 17, 2013 3:19 AM

    I tried that (Adding Trusted-Library true) to the jars and even the 3rd party jars.  I still get the pop up and this error:
    Exception in thread "thread applet-com/travelers/prefillapplet/PrefillApp.class-1" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
    Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
    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)

  • Impossible to run an applet in a signed jar from APEX page

    <applet id="runApp"
    CODE="TestApplet"
    ARCHIVE="/i/...path to applets dir.../applets/test.jar"
    width=1 height=1>
    </applet>
    The class TestApplet is in the jar's root.
    Java console shows:
    java.lang.ClassNotFoundException: TestApplet
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(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.io.IOException: open HTTP connection failed:http://kor:7777/i/...path to applets dir.../applets/test.jar/TestApplet.class
         at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 7 more
    The applet is not called by javascript => should not be blocked by Java plugin.
    Igor
    Edited by: kortchnoi on Nov 1, 2009 2:28 PM

    Well... All of a sudden it began to work. Why - I don't know. Maybe, because I have restarted the browser. Or else.
    Anyway, now I can launch *.exe (some legacy applications) from APEX on Firefox. Next step - IE that resists for the moment.
    Igor

  • Printing from trusted applet

    Hey boys and girls.
    I need a litle help. Does someone has expirience with printing on local raw printer from browser? I think that is possible, but since I am new with Java and some time to learn it good, I will relly on your help. It would be a super if your have a piece of code. Again, we are talking about raw dot-matrix printers and they will be used for printing data for documents like passport, personal ID's driver licence. You know, the old style... Thanks

    Hi Milind
    I never had security exception for printing from an Applet even if applet jar is not a signed jar and security policy file is not altered.

  • Printing From The Applet

    Can any body help me how to print from the applet. Without the security exception

    Hi Milind
    I never had security exception for printing from an Applet even if applet jar is not a signed jar and security policy file is not altered.

Maybe you are looking for