DeployJava.runApplet considered malware

hello Sun,
While I think your efforts to improve the ease of Java deployment are admirable, I have an issue with the overall operation of "http://java.com/js/deployJava.js":
The suggested download includes the Yahoo toolbar checked by default.
I feel that not only is this deceptive (the user should have a choice up front, as on the main Sun Java distribution site), but the opt-out nature gives off the impression of my site promoting malware.
I will continue to be part of this new deployment strategy, to file bugs and try to help improve the process, because I think this drive is important. But this new method will lose my support if this malware problem is not addressed.
Also, in terms of experience, it would be a huge benefit if the installer popped the viewer back to the referring site when it finished. The process is hard to follow right now.
Best Regards,
Brien Colwell

The latest 7 is 7u71, which you can find here: Java Downloads for All Operating Systems Version 7 Update 71
Try installing 7u71 and reply back about what messaging you see after that.
-Roger

Similar Messages

  • DeployJava.runApplet & JRE 8

    I have the latest/greatest JRE 7 (1.7_51) installed.  This is the at the 1.7 security baseline.
    In my web page I am trying to launch an applet that runs on 1.7 like this:
    var version = '1.7';
    deployJava.runApplet(attributes, parameters, version);
    I am informed that my plugin has security vulnerabilities and it directs me to install JRE 8 update 25.
    2 questions:
    1)  Why is it telling I have security vulnerabilities when I am at java 7 security baseline?
    2)  Why is it trying forcing Java 8 family on me?

    The latest 7 is 7u71, which you can find here: Java Downloads for All Operating Systems Version 7 Update 71
    Try installing 7u71 and reply back about what messaging you see after that.
    -Roger

  • How is DT Ignite not considered malware?

    Ability to download and install apps without going through Android package manager and without user consent?
    Where can the consumer research this on the Verizon web page? I dont see it. This is some shady stuff even for Verizon.
    Lance

    håkan221 wrote:
    How can I create a shortcut to the german letter "double s" like in "Straβe".
    If you are talking about a way to input ß via the keyboard, it would help if you told us what language keyboard you are using.  On the standard US keyboard this is done via alt/option + s.
    Regarding spellcheck, do you have Deutsch showing in system prefs/keyboard/text/spelling and in Edit > Spelling and Grammar > Show Spelling and Grammar?
    (For Pages 4 it is Inspector > Text > More > Language)

  • DeployJava.js doesn't work in FF 3.0.11?

    I have the following html code for running my applets:
    <script src="http://java.com/js/deployJava.js"></script>
         <script>
             var attributes = {code:'test.MyApplet.class',
                               archive:'MyApplet.jar,MyApplet_media.jar,MyLib.jar',
                               width:907, height:653} ;
             var parameters ;
             if (deployJava.versionCheck('1.6.0_10+')) {
                  parameters = {image:'animated_loader.gif', boxborder:'false', centerimage:'true'} ;
             } else {
                  parameters = {image:'static_loader.gif'} ;
             var version = '1.5' ;
             deployJava.runApplet(attributes, parameters, version);
         </script>It works fine in FF before 3.0.11 and IE 6-7, but FF 3.0.11 freezes and doesn't respond to user..
    I've already created a bug on bugzilla.mozilla.org for sure. https://bugzilla.mozilla.org/show_bug.cgi?id=498305
    Edited by: MrRed on Jun 15, 2009 3:37 AM

    Please contact PriceBlink for assistance with your issue here: http://www.priceblink.com/webcpns/page.php?sp_id=5
    As for the hanging please see the following:
    '''Try the Firefox Safe Mode''' to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.''
    ''(If you're not using it, switch to the Default theme.)''
    * You can open the Firefox 4.0+ Safe Mode by holding the '''Shift''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Don't select anything right now, just use "'Start in Safe Mode"''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again.''
    '''''If it is good in the Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one.
    Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''

  • I was told by apple support that I have malware on my iMac that is trying to convince me to buy their cleanup software.  I was told it was a scam and my computer is not infected, but they want my credit card info.  How do I remove the malware?

    How do I remove malware from my iMac?

    you can do a Google search for "anti-virus" and "mac" and see what you come up with. I think Norton now makes a program for mac with anti-trogan and anti-rootkit detection, and hopefully it'll get better with more time and more complaints
    As laverne's mom said, Norton's should never be installed on any Mac - period. I would not let it within 10 feet of my machines. It creates so many problems, it should be considered malware.  If you must install AV software, try ClamXAV; it is free. However, there are no viruses for Mac; the current problem is a trojan and if due diligence is observed, there is no problem.

  • Important addition to deployJava.js

    Hello,
    We slowly started to use deployJava.js on our produciton servers, and except few problems with Mac, it works pretty good. Today we needed dynamically (on a click), to populate a DIV with code like this, to start an applet.
    <script>
        var attributes = {codebase:'http://java.sun.com/products/plugin/1.5.0/demos/jfc/Java2D',
                          code:'java2d.Java2DemoApplet.class',
                          archive:'Java2Demo.jar',
                          width:710, height:540} ;
        var parameters = {fontSize:16} ;
        var version = '1.6.0' ;
        deployJava.runApplet(attributes, parameters, version);
    </script>And the reason why we don't do it at page load, because we don't want to run an applet everytime somebody visits the page, only when they click on a button. So, the problem was, that deployJava.runApplet method, which calls writeAppletTag method uses document.write(), which completely destroys content of the page. So, we had to make a local copy of deployJava.js, and change document.write() to just return us a string, which then we populate using innterHTML, and applet worked like a charm.
    So, since it's not a good idea to have a local copy of this deploy js tool, I would like to ask Sun to create a special method, which would return a HTML instead of using document.write directly.
    Thank you in advance,
    --Dmitri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Quick and dirty workaround:
          function activateApplet()
            var intercepted = ''; var got = document.write;
            document.write = function(arg){intercepted += arg;}
            deployJava.runApplet(attributes, parameters, '1.6');
            document.write = got;
            domElem.innerHTML = intercepted;
          }

  • DeployJava.js ,Applet Deployment errors?

    Some great work has been done on applet deployment. ref: [Applet deployment toolkit |http://blogs.sun.com/thejavatutorials/entry/deployment_toolkit_101 ]
    I've been trying to use this tool with considerable frustration. I'm serving internet applications on Godaddy.com and jar file usage is problematic during development with them. You have to wait for up to 24 hours to deploy .jar contents. What the fix? Use straight up classes to prove out an application. I know that I have users without java browser add ins, and I'd like to use the deployJava routine to keep things easy (for me!)
    Problem is that the deployJava.js defaults are set up for JNLP and .jar files. For anybody stuck with "Exception: java.lang.ClassNotFoundException: ..." errors, with deployJava, and you are only using .classes and not .jar files, you should be aware of the following:
    You have to specifically add the codebase_lookup parameter to the deployJava routine. [ reference: Codebase_lookup |http://java.sun.com/javase/6/docs/technotes/guides/plugin/developer_guide/special_attributes.html] This script assumes codebase_lookup = false. Thats not good for us xxx.class only folks.
    suggested solution:
    <script src="http://java.com/js/deployJava.js"></script>
    <script> var attributes = {  codebase:'classes', 
    code:'directory/cool_function.class',
    width:1000, height:650 };
    var parameters = {codebase_lookup:'true'}; <----- default behavior is 'false'
    deployJava.runApplet(attributes, parameters, '1.6');
    </script>
    Info offered here in case anybody else gets stuck on the same errors as I.
    thanks for reading. --Zip                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    zilti wrote:
    I have something that could be improved in the deployJava.js.So don't tell us. Raise a bug report through [http://bugs.sun.com/bugdatabase/].
    I'm sure this is something which could be done easily.In that case, make sure your bug report includes the changes to be made to the JS. Bug reports with code solutions will likely be given a higher priority than reports where the reporter reckons it will be easy for someone else to do the changes.

  • Applet-tag in deployJava.js - really!?!

    I have studied the deployJava source, and am surprised!
    From what I can deduce, the script embeds an invisible "object"-object or an "embed"-object when it is initially loaded.
    But the call to deployJava.runApplet() then actually embeds an "applet"-object!
    Isn't the applet tag long since depreciated?!?
    Also, why not simply make good use of the initial "object"- og "embed"-object, and place the applet there?
    I will comment on major lacks in a separate thread.

    Nope. Oracle doesn't even fix the bugs in this forum - thats how much they care.
    The best you can get is someone working on a certain API or spec to comment in the respective forum. It has happened that someone from the JSF group commented on JSF related topics (usually mentioning bugs) for example. But it is rare.

  • DeployJava.js and using css display:none;

    Hi all,
    I am using the deployJava.js to add an applet to a page.
    The applet is on a tab. My webpage has a few tabs and when you click from one to another using css I make a certain DIV disappear using display:none; and then to make the other DIV visible I use display:block;
    As I flick between tabs my applet has problems. Sometimes its loads and sometimes it doesn't. The documentation says you should only call deployJava.runApplet once, so maybe this is the problem. Any ideas how I should avoid this?
    Thanks,
    Cormac

    Hello Doktat,
    I also agree with you. This is a very annoying.
    My web application has a number of tabs and as you flick through them I use display:none; to hide certain divs.
    Unfortunately different browsers seem to handle differently.
    On Firefox, if I go to a different tab. My Applet is Stopped and when I go back to the original tab, my applet is redeployed and started again. This looks bad and also sometimes my applet doesn't show up at all, but maybe that is because I am calling deployJava more than once.
    On IE 7, everything seems to work beautifully and as I move between tabs the applet isn't started and stopped and deployJava only seems to be ever called once.
    This is frustrating, web pages are more complex now and java needs to fit in with this new complexity.
    I may have to move back to a pure javascript solution now. But I like to develop in java, so I keep pushing it to my manager and colleagues. Then it fails on something simple like this. I've been burnt before by applets and now it seems I am burnt again.
    I do hope that they think more about haw applets fit into more advanced situations.
    Talk later,
    Cormac

  • DeployJava.js and HTTPS Problem

    I'm using the following code for my applet:
    <script src="https://www.java.com/js/deployJava.js" type="text/javascript"></script>
    <script type="text/javascript">
      var attributes = {
        codebase:'.',
        code:'com.myclass.class',
        archive:'/applets/myprogram.jar',
        width:715,
        height:340};
      var parameters = {
        java_arguments:'-Djnlp.packEnabled=true',
        locale:'en_US',
        systemVersion:'${settings.systemVersion}',
      var version = '1.6';
      deployJava.runApplet(attributes, parameters, version);
    </script>The applet is hosted on https://mysite.com/myfile.jsf, when a user that has never had Java installed on his machine goes to my applet page it takes him to the Sun Java download page. After wards the user is taken to:
    http://https//mysite.com/myfile.jsf
    This is obviously an invalid link and instead should go back to the original URL. This does not happen and works correctly if the server is using http instead of https. Any ideas on how this can be fixed?

    Apparently no one has reported this is a bug on the bug parade. I did that, for what it's worth. I am shocked that this has been allowed to remain open for two years.

  • VSP is saying the gallery app is malware.

    VSP is saying the gallery app is malware.
    This app came with the phone, why is it now considered malware 9 months later?

    One of the reasons I do NOT use VSP on my phones is that they call everything Malware including the Photo Gallery and on some phones My Verizon Mobile (which I agree with it is malware).  I disable it (uninstall if you can but it is probably locked) and I use Lookout Mobile Security which is Free and very highly rated.

  • Is IE11 compatible with deployJava.js?

    I installed Windows 8.1 and tested WEB-START with Javascript(http://www.java.com/js/deployJava.js).
    It worked fine with Chrome but not with IE11.
    Below code returns empty.
    deployJava.getJREs();
    And below function redirects to Java Installation page.
    deployJava.runApplet(attributes, parameters, '1.6');
    Did anyone succeeded running WEB-START with JNLP file?

    As a temporary solution, you can modify deployJava.js adding a condition in line 1013
    1013: if ((browser.indexOf('msie') != -1) && (browser.indexOf('opera') == -1)) {
    new version
    1013: if ((browser.indexOf('msie') != -1) && (browser.indexOf('opera') == -1)  || (browser.indexOf('trident') != -1)) {
    Since IE11 doesn't send anymore MSIE in the useragent string (see previous Stefano answer for details)  the Trident string must be checked to identify new IE version.
    Hope that Oracle will fix this asap.

  • 1.6.0_23 JNLP2ClassLoader.findClass try again . slow jnlp applet loading

    Hello everyone,
    I am using jnlp to load applet. using jre1.6.0_23. (next generation plugin).
    While loading the applet I am getting following messages,
    security: The root CA hasnt been replaced
    security: No timestamping info available
    security: Found jurisdiction list file
    security: No need to checking trusted extension for this certificate
    security: The CRL support is disabled
    security: The OCSP support is disabled
    security: This OCSP End Entity validation is disabled
    security: Checking if certificate is in Deployment denied certificate store
    security: Checking if certificate is in Deployment permanent certificate store
    network: Cache entry not found [url: http://package/mic/ri/lib/japllet.jar, version: null]
    basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
    security: JAVAWS AppPolicy Permission requested for: http://testurl/test/ri/lib/jpllet.jar
    basic: JNLP2ClassLoader.getPermissions() X
    basic: JNLP2ClassLoader.findClass: com.pack.MyApplet: try again ..
    basic: JNLP2ClassLoader.findClass: com.pack.DefaultMICLookAndFeel: try again ..
    basic: JNLP2ClassLoader.findClass: com.pack.XMLScreen: try again ..
    basic: JNLP2ClassLoader.findClass: com.pack.JRenderer$1: try again ..
    basic: JNLP2ClassLoader.findClass: com.pack.TimeoutPopup: try again ..
    basic: JNLP2ClassLoader.findClass: com.pack.TransparentContainer: try again ..
    basic: JNLP2ClassLoader.findClass: com.pack.SwingWorker: try again ..
    basic: JNLP2ClassLoader.findClass: com.pack.JRenderer$10: try again ..
    basic: JNLP2ClassLoader.findClass: com.pack.StatusPanel: try again ..
    Let me know if anyone want to look at entire messages in java console.
    for all the classes in jar which is signed.
    JNLP I am using.
    *<?xml version="1.0" encoding="UTF-8" ?>*
    *<jnlp spec="1.0+">*
    *<information>*
    *<title>TestApp</title>*
    *<vendor>TestApp</vendor>*
    *</information>*
    *<security>*
    *<all-permissions/>*
    *<j2ee-application-client-permissions/>*
    *</security>*
    *<resources>*
    *<j2se version="1.6+"/>*
    *<jar href="japllet.jar" main="true" version="0007.0000.0012.0000"/>*
    *<property name="jnlp.versionEnabled" value="true"/>*
    *</resources>*
    *<applet-desc*
    name="TestApplet"
    main-class="com.pack.MyApplet"
    width="300"
    height="300">
    *</applet-desc>*
    *</jnlp>*
    and am using the deployJava.js in html.. find below the snippet from html,
    *+<script src=\"http://www.java.com/js/deployJava.js\"></script>+*
    *+<script type="text/javascript">+*
    +var attributes = {width:'100%', height:'100%'};+*
    +var parameters = {jnlp_href:'mttest.jnlp'}+*
    deployJava.runApplet(attributes, parameters, version);*
    *+</script>+*
    In the above script I have tried various combinations like codebase, code, type, archive. finally i kept the minimal attributes and parameters.
    Kindly note my applet is working fine in the browser. But I think because of the try again messages in java console it is taking time to load the applet ?
    Any help on this highly appreciated. I have almost spent my week trying to remove these messages.

    837182 wrote:
    ..the last message of fetching resources japllet.jar is there as i changed the location. .. How? To what? I now note the applet Jar uses a version number, which JaNeLA fails to take into account.
    ..but how about rest of the messages, How to get rid of those ? ..Although I wrote the software, in conjunction with others, we did not configure it to send us an email when someone runs the software. Because of that (and hopefully unsurprisingly) I will state that I do not know what JaNeLA reported. OTOH I will make a WAG that there was an 'invalid content' message somewhere in the report.
    Have you checked the JaNeLA Help page? It is the first place to check the error messages.
    Some notes:
    <li> Most of the errors are produced by J2SE inbuilt tools, and are messages common to XML validation. Search the net for them and you should find many hits.
    <li> You can 'ignore' the warnings and optimizations. They are intended to identify things that might or might not be relevant. JaNeLA is unable to tell, and prompts you to make an informed decision.
    As to whether it matters, consider this. I dealt with a failed JNLP launch that came down to illegal characters in the application title field. That is not something that JaNeLA even checks. But the simple principle is: Garbage In, Garbage Out. Before even considering why a JWS based launch is failing (or not working as you expect), it pays to ensure the input files are as logical and valid as we can make them. Otherwise 'all bets are off' as to how JWS clients will parse and act (or not) on the JNLP.
    Reviewing the original problem now that you have at least run the JaNeLA tool. Just as an 'out there' suggestion, try adding a codebase_lookup='false' parameter into the applet code (JNLP launch file(1)). That attribute is only relevant to applets that can use loose class files & JWS should not need that, but it might indicate a JRE bug if it speeds things up.
    1) ..Oh heck, throw it into the deployJava.js script as well. It will probably not help, but cannot hurt.
    BTW: How big is apllet.jar in bytes? How 'slow' in seconds/minutes is slow? What is the network bandwidth of the testing machine(s)?
    And now I remember to mention:
    1) 'apllet' -> 'applet'.
    2) Please use the code tags when posting Java or JavaScript code or snippets, XML/HTML/JNLP or input/output. For details see the 'sticky post' on the top of the forum thread listing. It is still possible to edit your original post to add the code tags.

  • Getting JNLP error: "exception: Unable to load resource:-"

    I've posted this question in Stackoverflow... but didn't get any answer...
    Hi Guys,
    I'm brand new to JNLP.
    I've been trying to fix this for straight 2 days... I have no clue...
    I've a dynamic web project in eclipse. And I wanted to append an Applet in html. It works fine, if I append it without using jnlp. But if I use jnlp, its throws exception...
    Please help me....
    Here is my package structure:
    DaaS
    DaaS\WebContent
    \WebContent\AppletToJS.html
    \WebContent\appletToJS.jnlp
    \WebContent\FirstApplet.jar
    "FirstApplet.jar" contains the Applet class - AppletToJS.java
    Here is my `jnlp` file:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp href="appletToJS.jnlp">
    <information>
    <title>Dynamic Tree Demo</title>
    <vendor>Dynamic Team</vendor>
    </information>
    <resources>
    <!-- Application Resources -->
    <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" />
    <jar href="FirstApplet.jar" main="true" />
    </resources>
    <applet-desc
    name="Applet To JS"
    main-class="acid.AppletToJS"
    width="300"
    height="300">
    </applet-desc>
    <update check="background"/>
    </jnlp>
    Here is my `html` file:
    <html lang="en-US">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <body>
    <script src="http://www.java.com/js/deployJava.js"></script>
    <script>
    var attributes = { code:"acid.AppletToJS",  width:100, height:100} ;
    var parameters = {jnlp_href: "appletToJS.jnlp"} ;
    deployJava.runApplet(attributes, parameters, "1.6");
    </script>
    <!-- <applet codebase="./jars" archive="FirstApplet.jar" Code="acid.appletToJS.class" width=200 Height=100></applet> -->
    <p id="summary"/>
    </body>
    </html>
    while I run my html page I got following error:
    <code>
    exception: Unable to load resource: http://localhost:8080/jars/FirstApplet.jar.
    com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost:8080/jars/FirstApplet.jar
         at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
         at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by:
    java.io.FileNotFoundException: http://localhost:8080/jars/FirstApplet.jar
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
         at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
         at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
         at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
         at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost:8080/jars/FirstApplet.jar
    </code>
    **http://localhost:8080/jars/FirstApplet.jar**
    - I really don't understand where the hell "/jars" coming from???
    - My project name is "DaaS" and my jar, html page and jnlp page are in same directory. And I'm running my html page on tomcat-7 server.
    Edited by: user1202074 on Feb 7, 2012 4:24 PM
    Edited by: user1202074 on Feb 7, 2012 4:24 PM

    It must be coming from the commented-out <applet> tag somehow.
    You aren't specifying an 'id' element. See the Deploy Java Toolkit documentation.

  • Copy in sand-boxed app. in 1.6.0_24+

    <ul>
    <li>Problem Summary
    <li>Question
    <li>Typical Output
    <li>See Also
    <li>Accumulated Results
    <ul>
    <li>Not grabbing focus
    <li>Grabbing focus
    </ul>
    <li>Source
    <ul>
    <li>PropertyProbe.java
    <li>propertyprobe.jnlp
    <li>js.html
    <li>Java Scripts
    </ul>
    <li>Post Revisions
    </ul>
    <h2><a name="summary"></a>Problem Summary</h2>
    A security bug was fixed recently in the JRE (1.6.0_24 in Sun's JRE). The result of the fix is that sand-boxed apps. no longer provide 'Ctrl-c' copy (or cut/paste) functionality by default on text output controls like JTextArea & JTable.
    While Ctrl-c copy no longer works by default, it is possible to add the functionality back in for any applet run in a 'Next Generation' Java Plug-In. Since Java Web Start existed, JWS provided sand-boxed copy via. the JNLP API's javax.jnlp.ClipboardService, & since Sun 1.6.0_10, & the next gen. plug-in, embedded applets can be deployed using JWS & can access the JNLP API.
    I have redesigned an applet that relied on the old functionality, to now use the JNLP API Services if available.
    <h2><a name="question"></a>Question</h2>
    Does it work for you?
    To answer that question:
    <ol>
    <li>Surf on over to the applet at http://pscode.org/prop/js.html and attempt to copy the data. See the instructions in the page for details of how to copy using the old and new forms of the applet. If the button appears, you should be prompted as to whether to allow the copy.
    <li>Paste the data here (assuming the copy is successful). Or report if it fails to copy or the applet fails to appear.
    </ol>
    <h2><a name="egoutput"></a>Typical Output</h2>
    This is what you might see at the applet.
    ||Property||Value||
    |java.version|1.6.0_24|
    |java.vendor|Sun Microsystems Inc.|
    |os.name|Windows 7|
    |os.version|6.1|
    <h2><a name="related"></a>See Also</h2>
    This relates to the thread Copy & Paste Function in Java JDK 6 Update 24. That thread contains some interesting comments, including:
    <ul>
    <li>A link to Sami Koivu's blog entry that explains the security bug.
    <li>My Re: Copy & Paste Function in Java JDK 6 Update 24 table.
    </ul>
    <h2><a name="results"></a>Accumulated Results</h2>
    <p>The first form of the applet showed a variety of problems with 'post copy focus', if the security prompt appeared in the JWS form of the applet.
    <h3><a name="nograbfocus"></a>Not grabbing focus</h3>
    ||Reporter||Browser||Version||OS name||OS version||Java Vendor||Java version||Focus post dialog||Comments||
    |Andrew Thompson|IE|8.0.7600.16385|Windows 7|6.1|Sun Microsystems Inc.|1.6.0_24|applet|(1)|
    |Andrew Thompson|Chrome|10.0.648.151|Windows 7|6.1|Sun Microsystems Inc.|1.6.0_24|page|(2)|
    |Andrew Thompson|FF|3.6.16|Windows 7|6.1|Sun Microsystems Inc.|1.6.0_24|*nothing*|(3)|
    |Walter Laan|FF|3.6.16|Windows 7|6.1|Sun Microsystems Inc.|1.6.0_20|*locked*|(4)|
    |almightywiz|FF|3.6.16|Windows 7|6.1|Sun Microsystems Inc.|1.6.0_24|?|(5)|
    |camickr|IE|8|Windows XP|5.1|Sun Microsystems Inc.|1.6.0_07|N/A|(6)|
    |Christian|FF|3.6.15|Windows XP|5.1|Sun Microsystems Inc.|1.6.0_24|no problems|(7)|
    |Walter Laan|?|?|Windows XP|5.1|Sun Microsystems Inc.|1.7.0-ea|page?|(8)|
    |abillconsl|FF|3.6.13|Windows XP|5.1|Sun Microsystems Inc.|1.6.0_12|?|(9)|
    <ol>
    <li>Makes 'Ding' sound when copying the alert is dismissed (who said MS was not security conscious?).
    <li>The only way to refocus the applet in Chrome is to click in it with the mouse.
    <li>'Alt space' allowed me to minimize/restore FF, but no key combo. I could think of would restore focus to controls in the browser or applet.
    <li>Reported serious problems with focus for FF on 1st start-up using 1.6.0_20 JRE. Unable to reproduce on the 1.6.0_24 JRE. Ref. {message:id=9470476}, {message:id=9470587}
    <li>Reported no problems with focus. Ref. {message:id=9470371}
    <li>1st report for a pre plug-in2 JRE. IE 8 produced no prompts (as expected), so the 'Focus post dialog' does not apply. No auditory warnings. Ref. {message:id=9470761}
    <li>'No problems with focus.'. Ref. {message:id=9474121}
    <li>Focus returned to page, presumably. Ref. {message:id=9474513}
    <li>Ctrl-a seemed to do nothing. No mention of focus. Ref. {message:id=9477829}
    </ol>
    <h3><a name="grabfocus"></a>Grabbing focus</h3>
    <p>The second form of the applet has a provision to grab the focus immediately after the copy (and presumably after the trust dialog).
    ||Reporter||Browser||Version||OS name||OS version||Java Vendor||Java version||Focus post dialog||Comments||
    |camickr|IE|8|Windows XP|5.1|Sun Microsystems Inc.|1.6.0_07|N/A|(1)|
    |Andrew Thompson|IE|8.0.7600.16385|Windows 7|6.1|Sun Microsystems Inc.|1.6.0_24|applet|-|
    |Andrew Thompson|Chrome|10.0.648.151|Windows 7|6.1|Sun Microsystems Inc.|1.6.0_24|applet|-|
    |Andrew Thompson|FF|3.6.16|Windows 7|6.1|Sun Microsystems Inc.|1.6.0_24|applet|-|
    |Paŭlo Ebermann|FF?|?|Linux2.6.34.7-0.7-desktop|2.6.34.7-0.7-desktop|Sun Microsystems Inc.|1.6.0_20|?|(2)|
    |bogdana|IE|9.0.8112.16421|Windows 7 |6.1|Sun Microsystems Inc.|1.6.0_22 |applet|(3)|
    <ol>
    <li>The first result for camickr can be inferred from the fact that a pre plug-in2 applet should behave the same in both forms of the applet. Ref. {message:id=9470761}
    <li>There are further updates on that thread that have not yet been reflected here. See the thread for details. Ref. P.E. comments at SO
    <li>Also reported the auditory warning in IE when dialog disappears. Ref. {message:id=9488352}
    </ol>
    <h3><a name="java"></a>PropertyProbe.java</h3>
    package org.pscode.tool.property;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.datatransfer.StringSelection;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.border.EmptyBorder;
    import java.util.Locale;
    import java.security.AccessControlException;
    import javax.jnlp.*;
    /** Adds a comma delimited list of property names defined in the
    props param, to the constructor of a new PropertiesPanel and
    displays it. */
    public class PropertyProbe extends JApplet {
        static String[] defaultProps = {
            "os.name",
            "os.version",
            "os.arch",
            "java.vendor",
            "java.version",
            "java.vm.version",
            "default_locale",
            "display_mode",
            "win.highContrast.on",
            "win.text.fontSmoothingOn",
            "win.defaultGUI.font",
            "awt.font.desktophints",
            "awt.mouse.numButtons",
            "awt.multiClickInterval"
        public void init() {
            String propertyNames = getParameter("prop");
            String[] props;
            if (propertyNames==null) {
                //getContentPane().add( new JLabel("Must specify 'prop' to query!") );
                props = defaultProps;
            } else {
                props = propertyNames.split(",");
            boolean grabFocus = getParameter("jnlp.grab.focus")!=null;
            System.out.println("jnlp.grab.focus: " + grabFocus);
            boolean jnlpServicesAvailable = getParameter("jnlp.launched")!=null;
            PropertyPanel pp = new PropertyPanel(props, jnlpServicesAvailable, grabFocus);
            pp.setPreferredSize(new Dimension(200,140));
            getContentPane().add( pp );
            validate();
        public static void main(final String[] args) {
            Runnable r = new Runnable() {
                public void run() {
                    String[] props = defaultProps;
                    if (args.length>0) {
                        props = args;
                    boolean jnlpServicesAvailable = false;
                    try {
                        Class.forName("javax.jnlp.ServiceManager");
                        jnlpServicesAvailable = true;
                        System.out.println("JNLP services available!");
                    } catch(Throwable t) {
                        t.printStackTrace();
                        System.out.println("JNLP services ***NOT*** available!");
                    PropertyPanel pp = new PropertyPanel(props, jnlpServicesAvailable, false);
                    pp.setPreferredSize(new Dimension(200,200));
                    JPanel mainPanel = new JPanel(new BorderLayout());
                    mainPanel.setPreferredSize(new Dimension(400,200));
                    mainPanel.add( pp );
                    JFrame f = new JFrame("Property Probe");
                    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    f.setContentPane(mainPanel);
                    f.pack();
                    try {
                        f.setLocation(50,50);
                        f.setLocationRelativeTo(null);
                        f.setLocationByPlatform(true);
                        f.setMinimumSize( f.getSize() );
                    } catch(Exception e) {
                    f.setVisible(true);
            EventQueue.invokeLater(r);
    class PropertyPanel extends JPanel {
        /** The JNLP API service used for copy in apps. deployed using JWS. */
        private ClipboardService clipboardService;
        private boolean grabFocus = false;
        private JTable table;
        /** A widget (JTable) of values for properties specified in the
        array of property names.  The properties are sourced from the
        system, environment and AWT toolkit properties.If there is no
        value defined in one of those three, 'null' is displayed. */
        PropertyPanel(String[] props, boolean jnlpServicesAvailable, boolean grabFocus) {
            super(new BorderLayout());
            this.grabFocus = grabFocus;
            setBorder( new EmptyBorder(5,5,5,5) );
            String[][] propValuePairs = new String[props.length][2];
            for ( int ii=0; ii<props.length; ii++ ) {
                propValuePairs[ii][0] = props[ii];
                propValuePairs[ii][1] = getProperty( props[ii] );
            String[] header = {"Property","Value"};
            table = new JTable( propValuePairs, header );
            try {
                table.setAutoCreateRowSorter(true);
            } catch (Exception e) {
                // pre 1.6 JRE, go with an unsorted table
            this.add( new JScrollPane( table ) );
            if (jnlpServicesAvailable) {
                try {
                    clipboardService =
                        (ClipboardService)ServiceManager.
                            lookup("javax.jnlp.ClipboardService");
                    Action action = new CopyAction(
                        "Copy",
                        null,
                        "Copy data",
                        new Integer(KeyEvent.VK_CONTROL+KeyEvent.VK_C));
                    table.getActionMap().put( "copy", action );;
                    final JButton copy = new JButton("Copy to clipboard");
                    copy.setMnemonic('c');
                    copy.addActionListener( action );
                    JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
                    bottomPanel.add(copy);
                    add(bottomPanel, BorderLayout.SOUTH);
                // Expecting only javax.jnlp.UnavailableServiceException.  But if we
                // try to catch it, we get a NoClassDefFoundError in non JWS apps.!
                } catch(Throwable use) {
                    use.printStackTrace();
                    System.err.println("Copy services not available.  Copy using 'Ctrl-c'.");
        /** Check for properties in the order of the toolkit, system
        then environment, on the basis that all the toolkit properties
        are    available to sandboxed apps., as well as some of the system
        properties, but none of the environment properties. */
        public String getProperty(String prop) {
            String value = null;
            if ( prop.equals("default_locale") ) {
                return Locale.getDefault().toString();
            if ( prop.equals("display_mode") ) {
                return getDisplayModeString();
            value = getDesktopProperty(prop);
            if (value!=null) {
                return value;
            value = getSystemProperty(prop);
            if (value!=null) {
                return value;
            value = getEnvironmentProperty(prop);
            if (value!=null) {
                return value;
            return "null";
        public String getSystemProperty( String prop ) {
            try {
                return System.getProperty( prop );
            } catch(AccessControlException ace) {
                // this property is either restricted, /or/ 'null'
                // the plug-in will not reveal which, for a sandboxed
                // app.
                return "unknown";
        public String getEnvironmentProperty(String prop) {
            try {
                Object value = System.getenv().get(prop);
                if (value==null) {
                    return null;
                } else {
                    return value.toString();
            } catch(AccessControlException ace) {
                return null;
        public String getDesktopProperty(String prop) {
            Object value = Toolkit.
                getDefaultToolkit().
                getDesktopProperty(prop);
            if (value==null) {
                return null;
            } else {
                return value.toString();
        public String getDisplayModeString() {
            DisplayMode dm = GraphicsEnvironment.
                getLocalGraphicsEnvironment().
                getDefaultScreenDevice().
                getDisplayMode();
            String value =
                dm.getWidth()
                +
                "x"
                +
                dm.getHeight()
                +
                +
                dm.getRefreshRate()
                +
                "Hz "
                +
                dm.getBitDepth()
                +
                "bit"
            return value;
        public void copyData(Component source) {
            TableModel model = table.getModel();
            StringBuilder sb = null;
            if (true) {
                sb = new StringBuilder();
                for (int ii=0; ii<model.getRowCount(); ii++) {
                    for (int jj=0; jj<model.getColumnCount(); jj++) {
                        sb.append( model.getValueAt(ii,jj).toString() );
                        sb.append( "\t" );
                    sb.append( "\n" );
            String s = sb.toString();
            if (s==null || s.trim().length()==0) {
                JOptionPane.showMessageDialog(this,
                    "There is no data in the table!");
            } else {
                StringSelection selection =
                    new StringSelection(s);
                clipboardService.setContents( selection );
            if (grabFocus) {
                source.requestFocus();
        class CopyAction extends AbstractAction {
            public CopyAction(String text, ImageIcon icon,
                String desc, Integer mnemonic) {
                super(text, icon);
                putValue(SHORT_DESCRIPTION, desc);
                putValue(MNEMONIC_KEY, mnemonic);
            public void actionPerformed(ActionEvent e) {
                copyData((Component)e.getSource());
    }<h3><a name="jnlp"></a>propertyprobe.jnlp</h3>
    <?xml version='1.0' encoding='UTF-8' ?>
    <jnlp spec='1.0'
        href='propertyprobe.jnlp'>
        <information>
            <title>Property Probe</title>
            <vendor>PSCode.org - Andrew Thompson</vendor>
            <description kind='one-line'>
                Table for common Java properties.
            </description>
            <shortcut online='false'>
                <desktop/>
            </shortcut>
        </information>
        <resources>
            <j2se version='1.2+' />
            <jar href='propprobe.jar' main='true' />
        </resources>
        <applet-desc
            main-class='org.pscode.tool.property.PropertyProbe'
            name='applet'
            width='600'
            height='300' >
            <param name='jnlp.launched' value='true' />
        </applet-desc>
    </jnlp><h3><a name="html"></a>js.html</h3>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <title>
    Property Probe - applet
    </title>
    <script type='text/javascript' src="http://www.java.com/js/deployJava.js"></script>
    <script type='text/javascript' src='http://pscode.org/file/urlcode.js'></script>
    <script type='text/javascript' src='http://pscode.org/file/queryprm.js'></script>
    <script type='text/javascript' src='http://pscode.org/file/urlquery.js'></script>
    <script type='text/javascript' src='http://pscode.org/file/appletparams.js'></script>
    <script type='text/javascript'>
    archiveName = "";
    if (true) {
        archiveName = 'propprobe.jar';
    } else {
        archiveName = 'propprobe-trusted.jar';
    var attributes = {
        code:'org.pscode.tool.property.PropertyProbe',
        codebase:'../lib',
        archive:archiveName,
        width:'600',
        height:'400'
    var version = '1.2';
    var params;
    params.jnlp_href='../lib/propertyprobe.jnlp';
    </script>
    </HEAD>
    <BODY>
    <H1>Property Probe</H1>
    <script type='text/javascript'>
    deployJava.runApplet( attributes, params, version );
    </script>
    <P>.. (text & instructions)
    </BODY>
    </HTML><h3><a name="scripts"></a>JavaScripts linked in the HTML</h3>
    'Sold separately' - pull them by direct fetch into your browser window, if you're that interested.
    <h2><a name="revisions"></a>Post Revisions</h2>
    Edited by: Andrew Thompson on Mar 26, 2011 5:32 AM
    Changed subject.
    Edited by: Andrew Thompson on Mar 26, 2011 5:19 PM
    Added accumulated results and index, other tweaks.
    Edited by: Andrew Thompson on Mar 31, 2011 11:08 AM
    Removed 'how output appears in code tags'. Added latest results, 'grab focus' results. Changed URL to invoke 'grab focus'.
    Edited by: Andrew Thompson on Apr 2, 2011 4:20 AM
    Added 1st result from SO - on Linux system.
    Edited by: Andrew Thompson on Apr 2, 2011 6:15 AM
    Added latest result.

    Walter Laan wrote:
    almightywiz wrote:
    Walter Laan wrote:
    The security popup really messes with the focus in Firefox (3.6.16) though.Not saying you're wrong, but I'm using FireFox 3.6.16, as well, and I have none of the focus troubles you've described.Cannot reproduce it now either. Weird.I got the impression you were referring to keyboard focus, so I did some further tests on focus behavior. The test results are listed in the Accumulated Results table on the 1st post.
    The only browser so far that works as I'd expect, or at least as I'd like, is IE.
    Applets and keyboard navigation have always been a PITA. Some time ago I vaguely recall seeing an update involving a new parameter to regulate initial focus (applet or page, ..or another applet), but for the life of me I cannot locate it now. Given that it was a parameter for initial focus, I doubt it would help in this case.
    Edited by: Andrew Thompson on Mar 26, 2011 6:18 PM
    Removed table which has now been expanded & added to 1st post.

Maybe you are looking for

  • How to Find the Explicitly Created Schemas in the Database?

    Hi, I am Using Oracle 11g Database R1 on Windows 2003 Server R2 , My Doubt is How Can i find the list of Schemas are explicitly created in the Database , We can Query this Tables DBA_USER Or SYS.USER$ to find the List of Available Schemas ( But it sh

  • How to encrypt Password while calling Portal URL from Abap

    Hi all, My requirement is to call portal from R/3 4.6C.  As part of it I'm calling Portal URL along with user id & Password by using the FM CALL_BROWSER. The problem here is User ID & Password are visible everyone in the URL. Is there any way that I

  • CS4 printing bug with trifold?

    Hello fellow designers, I'm running InDesign CS4 on a Power PC G5 under Leopard 10.5.8, and using an Epson Artisan 50 to print. I set up a letter sized, 3-panel brochure using the feature that allows you to lock "pages" together to make a spread. Env

  • How to add websites to content filter

    I have the 7+ age content filter set for one of the phones on my plan, but there are still some sites accessible that are inappropriate for this age setting. How do I suggest new sites to be reviewed and hopefully blocked by the parental control filt

  • Extracted Audio Files

    How can I control where PP CC saves extracted audio files that I have edited with Audition? Currently they are being stored with temporary files in the PP folder on my main drive. I want them to be saved in the same location as the original file. It