Page 1 of 2 12 LastLast
Results 1 to 20 of 29
  1. #1
    asad is offline Member
    Join Date
    Nov 2013
    Posts
    13
    Rep Power
    0

    Default Applet copy/paste not working after upgrading JRE 1.7

    I have applet which loads form. The form has text, textarea, dropdown, checkbox controls. After upgrading to JRE 1.7 Im not able to right click inside my text fields to copy/paste any content.

    My JAR file is dually signed and security permissions set. I have also tried the workaround by changing settings in .java.policy file :

    // "standard" properies that can be read by anyone permission java.awt.AWTPermission "accessClipboard";

    Interestingly enough I can do copy/paste by right click inside my TEXTAREA control but not inside any other control.

    Any suggestions/advice?

    Thanks

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,562
    Rep Power
    25

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    The new releases have closed some security holes and turned off the .java.policy file usage. The edits given at this link restored my .java.policy files usage:
    See: Java 7 unsigned applet permissions 1.7.0_45
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,093
    Rep Power
    6

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    I wonder: can you reproduce this problem in the most minimal applet with a text field that you can make? To rule out that it is somehow caused by "something else" you're doing in your applet, such as wrongly handling events or something else along that line.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    asad is offline Member
    Join Date
    Nov 2013
    Posts
    13
    Rep Power
    0

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    Quote Originally Posted by Norm View Post
    The new releases have closed some security holes and turned off the .java.policy file usage. The edits given at this link restored my .java.policy files usage:
    See: Java 7 unsigned applet permissions 1.7.0_45
    Norm, I tried this to no effect.

  5. #5
    asad is offline Member
    Join Date
    Nov 2013
    Posts
    13
    Rep Power
    0

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    Quote Originally Posted by gimbal2 View Post
    I wonder: can you reproduce this problem in the most minimal applet with a text field that you can make? To rule out that it is somehow caused by "something else" you're doing in your applet, such as wrongly handling events or something else along that line.
    gimbal2, I'll look into this aspect too. But I saw other websites like http://csis.pace.edu/~bergin/Java/applets.htm(though this one is unsigned) where text box is not clickable but another like this one http://www.muq.org/~cynbe/java/class...textareas.html where textarea is clickable.

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,562
    Rep Power
    25

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    I have a web page that uses an applet with text areas:
    Way Points

    I am able to copy and paste into its fields.

    The Java Console:
    Java Plug-in 10.45.2.18
    Using JRE version 1.7.0_45-b18 Java HotSpot(TM) Client VM
    User home directory = C:\Users\Norm
    ----------------------------------------------------
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    ----------------------------------------------------
    cache: Initialize resource manager: com.sun.deploy.cache.ResourceProviderImpl@193537d
    basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@1139acf
    basic: Plugin2ClassLoader.addURL parent called for http://www.waypoint.org/np/WayPoints.jar
    network: Cache entry found [url: http://www.waypoint.org/np/WayPoints.jar, version: null] prevalidated=false/0
    cache: Adding MemoryCache entry: http://www.waypoint.org/np/WayPoints.jar
    cache: Resource http://www.waypoint.org/np/WayPoints.jar has expired.
    network: Connecting http://www.waypoint.org/np/WayPoints.jar with proxy=DIRECT
    network: Connecting http://www.waypoint.org:80/ with proxy=DIRECT
    network: ResponseCode for http://www.waypoint.org/np/WayPoints.jar : 304
    network: Encoding for http://www.waypoint.org/np/WayPoints.jar : null
    network: Disconnect connection to http://www.waypoint.org/np/WayPoints.jar
    cache: Reading Signers from 5 http://www.waypoint.org/np/WayPoints.jar | C:\Users\Norm\AppData\LocalLow\Sun\Java\Deployment \cache\6.0\27\4f7159b-6ddb6c3a.idx
    network: No certificate info for unsigned JAR file: http://www.waypoint.org/np/WayPoints.jar
    cache: Done readSigners(http://www.waypoint.org/np/WayPoints.jar)
    cache: Read manifest for http://www.waypoint.org/np/WayPoints.jar: read=89 full=89
    security: Grant socket perm for http://www.waypoint.org/np/WayPoints.jar : java.security.Permissions@287422 (
    ("java.net.SocketPermission" "www.waypoint.org" "connect,accept,resolve")
    )

    security: Accessing keys and certificate in Mozilla user profile: null
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    0
    basic: Embedding dialogs not enabled in Configuration
    security: SSV validation:
    running: 1.7.0_45
    requested: null
    range: null
    javaVersionParam: null
    Rule Set version: null
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    security: continue with running version
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7
    network: Created version ID: 2.2.45
    security: --- parseCommandLine converted :
    into:
    []
    WayPointsApplet Constructor 7 Aug 2006
    basic: Applet loaded.
    basic: Applet resized and added to parent container
    basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 1238866 us, pluginInit dt 9116323 us, TotalTime: 10355189 us
    network: Cache entry found [url: http://www.waypoint.org/np/WayPoints...sIndex.idx.txt, version: null] prevalidated=false/0
    cache: Adding MemoryCache entry: http://www.waypoint.org/np/WayPoints...sIndex.idx.txt
    cache: Resource http://www.waypoint.org/np/WayPoints...sIndex.idx.txt has expired.
    network: Connecting http://www.waypoint.org/np/WayPoints...sIndex.idx.txt with proxy=DIRECT
    network: ResponseCode for http://www.waypoint.org/np/WayPoints...sIndex.idx.txt : 304
    network: Encoding for http://www.waypoint.org/np/WayPoints...sIndex.idx.txt : null
    network: Disconnect connection to http://www.waypoint.org/np/WayPoints...sIndex.idx.txt
    basic: Applet initialized
    basic: Starting applet
    basic: completed perf rollup
    basic: Applet made visible
    basic: Applet started
    basic: Told clients applet is started
    network: Cache entry found [url: http://www.waypoint.org/np/WayPoints...merica.idx.txt, version: null] prevalidated=false/0
    cache: Adding MemoryCache entry: http://www.waypoint.org/np/WayPoints...merica.idx.txt
    cache: Resource http://www.waypoint.org/np/WayPoints...merica.idx.txt has expired.
    network: Connecting http://www.waypoint.org/np/WayPoints...merica.idx.txt with proxy=DIRECT
    network: ResponseCode for http://www.waypoint.org/np/WayPoints...merica.idx.txt : 304
    network: Encoding for http://www.waypoint.org/np/WayPoints...merica.idx.txt : null
    network: Disconnect connection to http://www.waypoint.org/np/WayPoints...merica.idx.txt
    network: Cache entry found [url: http://www.waypoint.org/np/WayPoints...ermuda.wps.txt, version: null] prevalidated=false/0
    cache: Adding MemoryCache entry: http://www.waypoint.org/np/WayPoints...ermuda.wps.txt
    cache: Resource http://www.waypoint.org/np/WayPoints...ermuda.wps.txt has expired.
    network: Connecting http://www.waypoint.org/np/WayPoints...ermuda.wps.txt with proxy=DIRECT
    network: ResponseCode for http://www.waypoint.org/np/WayPoints...ermuda.wps.txt : 304
    network: Encoding for http://www.waypoint.org/np/WayPoints...ermuda.wps.txt : null
    network: Disconnect connection to http://www.waypoint.org/np/WayPoints...ermuda.wps.txt
    network: Checking for update at: https://javadl-esd-secure.oracle.com...seline.version
    network: Checking for update at: https://javadl-esd-secure.oracle.com...cklisted.certs
    security: JSS is not configured
    network: Checking for update at: https://javadl-esd-secure.oracle.com/update/blacklist
    network: Connecting https://javadl-esd-secure.oracle.com...cklisted.certs with proxy=DIRECT
    network: Connecting https://javadl-esd-secure.oracle.com/update/blacklist with proxy=DIRECT
    network: Connecting https://javadl-esd-secure.oracle.com...seline.version with proxy=DIRECT
    network: Cache entry not found [url: file:/C:/Program%20Files/Java/jre7/lib/ext/sunec.jar, version: null]
    network: Cache entry not found [url: file:/C:/Program%20Files/Java/jre7/lib/ext/sunjce_provider.jar, version: null]
    network: Connecting http://javadl-esd-secure.oracle.com:443/ with proxy=DIRECT
    network: Connecting http://javadl-esd-secure.oracle.com:443/ with proxy=DIRECT
    network: Connecting http://javadl-esd-secure.oracle.com:443/ with proxy=DIRECT
    security: Loading Root CA certificates from C:\Program Files\Java\jre7\lib\security\cacerts
    security: Loaded Root CA certificates from C:\Program Files\Java\jre7\lib\security\cacerts
    security: Loading SSL Root CA certificates from C:\Program Files\Java\jre7\lib\security\cacerts
    security: Loaded SSL Root CA certificates from C:\Program Files\Java\jre7\lib\security\cacerts
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    network: Connecting https://javadl-esd-secure.oracle.com...cklisted.certs with cookie "s_nr=1384867454380; s_cc=true; s_sq=%5B%5BB%5D%5D"
    network: Connecting https://javadl-esd-secure.oracle.com...seline.version with cookie "s_nr=1384867454380; s_cc=true; s_sq=%5B%5BB%5D%5D"
    network: Connecting https://javadl-esd-secure.oracle.com/update/blacklist with cookie "s_nr=1384867454380; s_cc=true; s_sq=%5B%5BB%5D%5D"
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    network: Created version ID: 1.7.0.45
    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    asad is offline Member
    Join Date
    Nov 2013
    Posts
    13
    Rep Power
    0

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    Norm, your website has textarea controls and in my case too it's working fine for textarea controls. Where it is not working is text field or other form controls.

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,562
    Rep Power
    25

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    is not working is text field
    Where were those text fields on my applet that did not work?
    If you don't understand my response, don't ignore it, ask a question.

  9. #9
    asad is offline Member
    Join Date
    Nov 2013
    Posts
    13
    Rep Power
    0

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    Applet copy/paste not working after upgrading JRE 1.7-capture.png
    Quote Originally Posted by Norm View Post
    Where were those text fields on my applet that did not work?
    Your website has textarea. While my problem is related with text fields

  10. #10
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,093
    Rep Power
    6

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    I'm curious: what GUI toolkit are you using exactly? AWT? Swing? JavaFX2?

    I did a search for a bug relating to this and didn't come up with anything recent yet; I do see mentioning of copy/paste being disabled in applets in the past. So unless my Google search skills are failing me (which has happened before), this is either a you-problem or it is something widely known so it is not reported as a bug. Who knows, perhaps the bug is even that you CAN copy/paste into a textarea :/
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  11. #11
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,562
    Rep Power
    25

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    The site has several different windows. Some of them have text fields. Read a list of waypoints, select one and Edit it.
    The Edit window has text fields.
    If you don't understand my response, don't ignore it, ask a question.

  12. #12
    asad is offline Member
    Join Date
    Nov 2013
    Posts
    13
    Rep Power
    0

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    Quote Originally Posted by Norm View Post
    The site has several different windows. Some of them have text fields. Read a list of waypoints, select one and Edit it.
    The Edit window has text fields.
    I clicked on new route and got this form but Im not able to right click inside these text fields. Are you able to right click inside the text fields on this form? I checked on two different machines and found the same behaviour:

    Applet copy/paste not working after upgrading JRE 1.7-capture.png

  13. #13
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,562
    Rep Power
    25

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    Yes, I can change what is in those text fields and can copy from and paste into them.
    Attached Thumbnails Attached Thumbnails Applet copy/paste not working after upgrading JRE 1.7-wp_edit_window.png  
    If you don't understand my response, don't ignore it, ask a question.

  14. #14
    asad is offline Member
    Join Date
    Nov 2013
    Posts
    13
    Rep Power
    0

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    By right clicking and doing copy from menu or from ctrl+c and ctrl+v? I can do ctrl +c and ctrl+v in my applet also the issue is only about menu on right click which has copy/paste options.

  15. #15
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,562
    Rep Power
    25

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    the issue is only about menu on right click which has copy/paste options.
    Are you saying that normal clicking on fields works? They can be copied and pasted using the keyboard.
    The problem is when the applet's code tries to write to or read from the clipboard.
    Can you make a small, simple program that shows what you are trying to do?
    If you don't understand my response, don't ignore it, ask a question.

  16. #16
    asad is offline Member
    Join Date
    Nov 2013
    Posts
    13
    Rep Power
    0

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    Quote Originally Posted by Norm View Post
    Are you saying that normal clicking on fields works? They can be copied and pasted using the keyboard.
    The problem is when the applet's code tries to write to or read from the clipboard.
    Can you make a small, simple program that shows what you are trying to do?
    yes it has been working until recent JRE update which has disabled it. Right click on any of textarea field and you'll see a menu with copy/paste options among others. The same was available for all form controls before latest JRE version disabled it. If you want to confirm you can revert your JRE to some older version like 1.4 and see it was working then. My whole issue is about this menu only as our customers who have been using our applets find it convenient to copy / paste using mouse.

  17. #17
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,562
    Rep Power
    25

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    Sorry, I'm not sure what you are saying. Does the program try to read/write to the clipboard?
    Or are you talking about the behavior of the java text fields? Or about text areas?
    If you don't understand my response, don't ignore it, ask a question.

  18. #18
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,091
    Rep Power
    20

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    He's saying that when using the right mouse click to pull up an OS menu (as I can do in this very reply box here), you used to get the same menu in a text field as you did in a text area.
    Since the update the menu no longer appears for a text field, so Oracle have changed something.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  19. #19
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,562
    Rep Power
    25

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    I just executed a java program with text fields and text areas using: D:\Java\jdk1.6.0_29\bin\java.exe
    I do not get any menu when I right click in the fields or the areas.
    If you don't understand my response, don't ignore it, ask a question.

  20. #20
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,091
    Rep Power
    20

    Default Re: Applet copy/paste not working after upgrading JRE 1.7

    ditto.
    So I have no idea what's going on with the OP...:)

    Oh, and I don't get one on a JTextArea either.

    This is on 1.6_51.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Page 1 of 2 12 LastLast

Similar Threads

  1. Copy-Sync-Paste 0.1
    By java software in forum Java Software
    Replies: 0
    Last Post: 04-20-2013, 08:34 AM
  2. Replies: 5
    Last Post: 02-08-2012, 02:17 PM
  3. cut/copy/paste in JTextField
    By gauravmanral in forum AWT / Swing
    Replies: 14
    Last Post: 09-25-2011, 07:07 AM
  4. Replies: 5
    Last Post: 05-23-2010, 05:24 PM
  5. Cut, copy and Paste in JTextPane
    By Gudradain in forum AWT / Swing
    Replies: 1
    Last Post: 01-03-2009, 06:43 AM

Posting Permissions

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