Results 1 to 15 of 15
  1. #1
    Ezhilg is offline Member
    Join Date
    Jul 2013
    Posts
    7
    Rep Power
    0

    Default Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    Hi,

    we have a custom solution to print the pdf file in silent mode when ever new pdf file is created. this solution is developed in OAF (Oracle Application Framework) and Java applet.

    We have a OAF page this will check every 4 min, is there any new pdf file is got created, if so it will invoke the java applet to send the pdf file to a printer. The user start the OAF page and it will keep on running and he can do his work with out interact with this page. So The OAF page will keep on checking every 4 min and invoke the Java Applet and it will print the pdf file with out user intervention. it was working fine in JRE 1.6.0.18

    But in JRE 1.6.0.20 or higher version it is not working as expected. when ever the OAF invoke the Java Applet, the Java Applet screen pop-up to the user. so the user work is disrupted. is their any bug on JRE1.6.0.20 or higher version? The below code is used to invoke Java Applet from OAF

    protected void setAppletCodeforMSIE(OAPageContext pageContext, OAWebBean webBean) {
    String startPrintProcess = pageContext.getParameter("paramPrintStart");
    String document = pageContext.getParameter("paramDOCUMENT");
    String jSessionId = pageContext.getSessionId();
    String debug = "true";
    String debugStr = pageContext.getParameter("DEBUG");
    if (debugStr != null && debugStr.equalsIgnoreCase("false")) {
    debug = "false";
    }
    String codeBaseUrlString = "print_lib/";
    String archiveJar = "SAutoPrint.jar,SPDFRenderer-0.9.1.jar";
    StringBuffer appletCodeStr = new StringBuffer();
    // appletCodeStr.append("<object border=\"0\" style=\"background-color:#D9E5EF;\" width=\"700\" height=\"150\" classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\">\n");
    // appletCodeStr.append(" codebase=\"https://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=1,6,0,26\">\n");

    appletCodeStr.append("<object border=\"0\" style=\"background-color:#D9E5EF;\" width=\"700\" height=\"150\" classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"\n");
    appletCodeStr.append(" codebase=\"https://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=1,6,0,26\">\n");
    appletCodeStr.append(" <param name=\"java_arguments\" value=\"-Xmx412m\"></param>\n");
    appletCodeStr.append(" <param name=\"java_version\" value=\"1.6+\"></param>\n");
    //appletCodeStr.append(" <param name=\"classloader_cache\" value=\"false\"></param>\n");
    //appletCodeStr.append(" <param name=\"separate_jvm\" value=\"true\"></param>\n");
    appletCodeStr.append(" <param name=\"name\" value=\"USPS Local Print\"></param>\n");
    appletCodeStr.append(" <param name=\"alt\" value=\"USPS Local Print\"></param>\n");
    appletCodeStr.append(" <param name=\"CODE\" value=\"usps.xxsmgt.applet.PrinterApplet3\"></param>\n");
    appletCodeStr.append(" <param name=\"ARCHIVE\" value=\"\"></param>\n");
    appletCodeStr.append(" <param name=\"cache_option\" value=\"Plugin\"></param>\n");
    appletCodeStr.append(" <param name=\"codebase_lookup\" value=\"false\"></param>\n");
    appletCodeStr.append(" <param name=\"cache_archive\" value=\"" + archiveJar + "\"></param>\n");
    appletCodeStr.append(" <param name=\"jsessionid\" value=\"" + jSessionId + "\"></param>\n");
    appletCodeStr.append(" <param name=\"startPrintProcess\" value=\"" + startPrintProcess + "\"></param>\n");
    appletCodeStr.append(" <param name=\"CODEBASE\" value=\"" + codeBaseUrlString + "\"></param>\n");
    appletCodeStr.append(" <param name=\"DOCUMENT\" value=\"" + document + "\"></param>\n");
    appletCodeStr.append(" <param name=\"DEBUG\" value=\"" + debug + "\"></param>\n");
    appletCodeStr.append(" <strong>\n");
    appletCodeStr.append(" This browser does not have a Java Plug-in.\n");
    appletCodeStr.append(" <br />\n");
    appletCodeStr.append(" <a href=\"https://java.sun.com/products/plugin/downloads/index.html\">\n");
    appletCodeStr.append(" Get the latest Java Plug-in here.\n");
    appletCodeStr.append(" </a>\n");
    appletCodeStr.append(" </strong>");
    appletCodeStr.append("</object>");
    String appletCode = new String(appletCodeStr);
    OARawTextBean appletBean = (OARawTextBean)webBean.findChildRecursive("RawText Bean");
    appletBean.setRendered(true);
    appletBean.setValue(pageContext, appletCode);

    }

    Please help me, i was working on this issue very long time and not having the solution, please help.

    Thanks
    Ezhil

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,874
    Rep Power
    8

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    This isn't a bug. The latest Java updates prompt the user to run a Java applet. I believe this can be changed in the Java section of your control panel.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Ezhilg is offline Member
    Join Date
    Jul 2013
    Posts
    7
    Rep Power
    0

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    Hi,

    Thanks for the reply. I guess, you are taking about the digital certificate pop-up,This is signed applet, so for the first time it show regarding the digital certificate warning pop-up, once the user accept to run the applet, the digital certificate pop-up is not coming, But the applet screen is pop-up every time when ever the applet is invoked, for example if the user is working on word document and the OAF page is running with out user interaction, when ever the OAF invoke the java applet then the Applet screen pop-up and focus is transferred from word document to Applet screen, even though the user is not interacting with applet screen.

    Hope you got the issue. This behavior is happening in Jre1.6.0.20 or higher version only

    Thank You.

    Ezhil

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,874
    Rep Power
    8

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    Are you saying that the applet steals the focus? Or comes to the front of the display? Or pops up a dialog? Something else?

    Do you have a screenshot of what's going on?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Ezhilg is offline Member
    Join Date
    Jul 2013
    Posts
    7
    Rep Power
    0

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    Hi,

    it's come front of the display.

    Thanks.

  6. #6
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,874
    Rep Power
    8

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    Interesting. Can you provide an SSCCE that demonstrates the problem? This shouldn't be just a snippet, but it shouldn't be your entire program either. As of now we don't have enough information to even hazard a guess.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  7. #7
    Ezhilg is offline Member
    Join Date
    Jul 2013
    Posts
    7
    Rep Power
    0

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    Hi,

    What is mean by SSCCE? is it kind of web conference? or do you need screen shot? please let me know.

    Thank You.

  8. #8
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    Quote Originally Posted by Ezhilg View Post
    What is mean by SSCCE?
    Click the link ^^^

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  9. #9
    Ezhilg is offline Member
    Join Date
    Jul 2013
    Posts
    7
    Rep Power
    0

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    Hi,

    I gone thru the site to create SSCCE, I guess, you need the code and more explanation about the issue. am i correct.
    I can send the code. Please help me.

    Regards
    Ezhil

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    An SSCCE should be as small as it possibly can be that shows the problem.
    So you need to do some work to cut down your application to the point that only the bits that are causing the failure are there.

    In your case that might be as simple as testing the problem using the most basic of HelloWorld applets.
    If that works then you need to start adding back your functionality until you find out which bit is causing the problem.

    At that point you will have narrowed down the bug and may even solve it yourself.
    But at the least it means we don't have to wade through irrelevant code.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  11. #11
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,712
    Rep Power
    5

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    when ever the OAF invoke the Java Applet
    I am curious. How would that work? What does the framework actually do specifically when "invoking the applet"?
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  12. #12
    Ezhilg is offline Member
    Join Date
    Jul 2013
    Posts
    7
    Rep Power
    0

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    Hi,

    I created the SSCCE. I am not able to attach the screen shot due to size issue, i have 120kb but it's allow only 19kb.
    do we have any other alternate.

    Thank You.

    Regards
    Ezhil

  13. #13
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,712
    Rep Power
    5

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    I would focus on the key point in Tolls' last post:

    In your case that might be as simple as testing the problem using the most basic of HelloWorld applets.
    If that works then you need to start adding back your functionality until you find out which bit is causing the problem.

    At that point you will have narrowed down the bug and may even solve it yourself.
    Ergo, you take what you created and test stuff out to see if you yourself can reproduce the problem in a simplified form; no need to be posting it here, yet. Then you can experiment and see what causes it. Then at least you'll be a step further.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  14. #14
    Ezhilg is offline Member
    Join Date
    Jul 2013
    Posts
    7
    Rep Power
    0

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    Hi Erik,

    We used HTML to invoke/deploy the Java Applet in OAF (Oracle Application Framwork) the code as below

    protected void setAppletCodeforMSIE(OAPageContext pageContext, OAWebBean webBean) {
    String startPrintProcess = pageContext.getParameter("paramPrintStart");
    String document = pageContext.getParameter("paramDOCUMENT");
    String jSessionId = pageContext.getSessionId();
    String debug = "true";
    String debugStr = pageContext.getParameter("DEBUG");
    if (debugStr != null && debugStr.equalsIgnoreCase("false")) {
    debug = "false";
    }
    String codeBaseUrlString = "print_lib/";
    String archiveJar = "SAutoPrint.jar,SPDFRenderer-0.9.1.jar";
    StringBuffer appletCodeStr = new StringBuffer();

    appletCodeStr.append("<object border=\"0\" style=\"background-color:#D9E5EF;\" width=\"700\" height=\"150\" classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"\n");
    appletCodeStr.append(" codebase=\"https://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=1,6,0,26\">\n");
    appletCodeStr.append(" <param name=\"java_arguments\" value=\"-Xmx412m\"></param>\n");
    appletCodeStr.append(" <param name=\"java_version\" value=\"1.6+\"></param>\n");
    appletCodeStr.append(" <param name=\"name\" value=\"USPS Local Print\"></param>\n");
    appletCodeStr.append(" <param name=\"alt\" value=\"USPS Local Print\"></param>\n");
    appletCodeStr.append(" <param name=\"CODE\" value=\"usps.xxsmgt.applet.PrinterApplet3\"></param>\n");
    appletCodeStr.append(" <param name=\"security\" value=\"all-permissions\"></param>\n");
    appletCodeStr.append(" <param name=\"ARCHIVE\" value=\"\"></param>\n");
    appletCodeStr.append(" <param name=\"cache_option\" value=\"Plugin\"></param>\n");
    appletCodeStr.append(" <param name=\"codebase_lookup\" value=\"false\"></param>\n");
    appletCodeStr.append(" <param name=\"cache_archive\" value=\"" + archiveJar + "\"></param>\n");
    appletCodeStr.append(" <param name=\"jsessionid\" value=\"" + jSessionId + "\"></param>\n");
    appletCodeStr.append(" <param name=\"startPrintProcess\" value=\"" + startPrintProcess + "\"></param>\n");
    appletCodeStr.append(" <param name=\"CODEBASE\" value=\"" + codeBaseUrlString + "\"></param>\n");
    appletCodeStr.append(" <param name=\"DOCUMENT\" value=\"" + document + "\"></param>\n");
    appletCodeStr.append(" <param name=\"DEBUG\" value=\"" + debug + "\"></param>\n");
    appletCodeStr.append(" <strong>\n");
    appletCodeStr.append(" This browser does not have a Java Plug-in.\n");
    appletCodeStr.append(" <br />\n");
    appletCodeStr.append(" <a href=\"https://java.sun.com/products/plugin/downloads/index.html\">\n");
    appletCodeStr.append(" Get the latest Java Plug-in here.\n");
    appletCodeStr.append(" </a>\n");
    appletCodeStr.append(" </strong>");
    appletCodeStr.append("</object>");
    String appletCode = new String(appletCodeStr);
    OARawTextBean appletBean = (OARawTextBean)webBean.findChildRecursive("RawText Bean");
    appletBean.setRendered(true);
    appletBean.setValue(pageContext, appletCode);

    }

    Thanks

  15. #15
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,820
    Rep Power
    19

    Default Re: Invoking Java Applet with JRE1.6.0.37 -- Need Help Urgent

    Take OAF out completely.
    It is not "invoking the applet".
    That code above is simply creating the html to append to a page.
    So your first step is (surely) to create a simple HTML page that has that tag in there.

    You should be logging the value of appletCodeStr and copy/pasting it into the page directly so you can ensure the actual values are retained.
    Then stick that page on your server and have IE try and open it.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Invoking method from applet
    By Dissonance in forum Java Applets
    Replies: 0
    Last Post: 07-09-2012, 09:42 PM
  2. Invoking mac Calculator in java
    By victaino in forum New To Java
    Replies: 1
    Last Post: 05-28-2012, 02:21 PM
  3. Invoking Java Script
    By mehulshah in forum SWT / JFace
    Replies: 0
    Last Post: 01-05-2012, 07:04 AM
  4. Need help with applet calculating a price!! URGENT!
    By CJeremy in forum New To Java
    Replies: 7
    Last Post: 03-15-2011, 04:06 AM
  5. ERROR DEPLOYING WEB APPLET......help needed urgent
    By bonjovi4u in forum Java Applets
    Replies: 1
    Last Post: 03-16-2010, 03:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •