Results 1 to 6 of 6
Like Tree1Likes
  • 1 Post By Norm

Thread: Not Getting "SourceURL" When content copied form browser using Clipboard java

  1. #1
    Anuj Oscar is offline Member
    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0

    Default Not Getting "SourceURL" When content copied form browser using Clipboard java

    I am not able to get the "SourceURL" when Content is copied from any Browser using java.awt.datatransfer.Clipboard, even this information is already available on System Clipboard.

    Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
    Transferable t = clipboard.getContents(null);
    DataFlavor dfs[] = t.getTransferDataFlavors();
    for(DataFlavor df : dfs){
    try {
    System.out.println(t.getTransferData(df));
    } catch (Exception ex) {
    ex.printStackTrace();
    }
    }

    Please any one could help me to find "SourceURL"

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

    Default

    What/where is "SourceURL"?

  3. #3
    Anuj Oscar is offline Member
    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0

    Default Not Getting "SourceURL" When content copied form browser using Clipboard java

    Hi,

    if you are using windows then just copy any content form a browser and then go to run and type "%windir%\system32\clipbrd.exe". You will see there what you have copied, save it with any name from File menu. After that open it in notepad , you will see "SourceURL" of the browser from where you have copied the content.

    Thant i wants using Java.

    Thanks for your reply.

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,812
    Rep Power
    25

    Default

    Can you copy and paste here what you are talking about?

  5. #5
    Anuj Oscar is offline Member
    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0

    Default

    StartHTML:00000172
    EndHTML:00000513
    StartFragment:00000206
    EndFragment:00000477
    SourceURL:[PJUG Javamail] Java- Finding the source URL on the clipboard from cut-and-paste
    <html><body>
    <!--StartFragment--><pre>Copied Text From a Web page
    </pre><!--EndFragment-->
    </body>
    </html>

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

Similar Threads

  1. Java, Military Format using "/" and "%" Operator!!
    By sk8rsam77 in forum New To Java
    Replies: 11
    Last Post: 02-26-2010, 04:03 AM
  2. Replies: 1
    Last Post: 01-21-2010, 10:20 AM
  3. Replies: 2
    Last Post: 05-30-2009, 11:42 AM
  4. Replies: 2
    Last Post: 01-29-2009, 08:17 PM
  5. Replies: 1
    Last Post: 10-20-2008, 08:35 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
  •