Image to system clipboard running in Thread issue

In one of my applets I copy an image to the system clipboard. The issue I am having is that if I'm running other threads the "setContents()" method never seems to be allowed to complete or takes a really long time no matter the size of the image. All my threads have "wait" statements and my CPU load is 1%. Has anyone else had this same issue? What is a recommended workaround?

Do you know that an unsigned applet can't access the clipboard?

Similar Messages

  • Paste Image to System Clipboard

    Hello all...I can't paste an Image to the system clipboard and was wondering if you could help me. Noticed there was some help on this topic with JDK 1.4.1, however I'm using JDK 1.3.1.
    I following code was copied from Sun at http://developer.java.sun.com/developer/Books/GJ21AWT/ch20.pdf
    but I cant get it to work.
    <code>
    //implement the class like this
    ImageSelection is = new ImageSelection(Constants.DRAWINGSLATE.currentImage.pBitmap[dList.ptr].getImage());
    toolkit.getSystemClipboard().setContents(is, null);
    class ImageSelection implements ClipboardOwner, Transferable
    public static DataFlavor ImageFlavor;
    public static DataFlavor ImageArrayFlavor;
    private DataFlavor[] flavors = {ImageFlavor, ImageArrayFlavor};
    private java.awt.Image image;
    private int width, height;
    static
    try
    ImageFlavor = new DataFlavor(Class.forName("java.awt.Image"),"AWT Image");
    ImageArrayFlavor = new DataFlavor("image/gif", "GIF Image");
    catch(Exception e)
    public ImageSelection(Image image)
    this.image = image;
    public ImageSelection(Image image, int width, int height)
    this.image = image;
    this.width = width;
    this.height = height;
    public synchronized DataFlavor[] getTransferDataFlavors()
    return flavors;
    public boolean isDataFlavorSupported(DataFlavor flavor)
    return flavor.equals(ImageFlavor) || flavor.equals(ImageArrayFlavor);
    public synchronized Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException
    if (flavor.equals(ImageFlavor))
    return image;
    if (flavor.equals(ImageArrayFlavor))
    return imageToArray();
    else
    throw new UnsupportedFlavorException(flavor);
    public void lostOwnership(Clipboard c, Transferable t)
    private int[] imageToArray()
    int[] pixels = new int[width*height];
    PixelGrabber pg = new PixelGrabber(image, 0, 0, width, height, pixels, 0 , width);
    try
    pg.grabPixels();
    catch(InterruptedException e)
    e.printStackTrace();
    return pixels;
    </code>
    I get this exception
    Couldn't write data flavor java.awt.datatransfer.DataFlavor[representationclass=java.awt.Image;mimetype=application/x-java-serialized-object] to clipboard:
    java.io.IOException: Transferable's flavor data is of unexpected class com.apple.mrj.internal.awt.graphics.VImage
    Thanks for any help.

    I was trying to use ur code with slight modification
    import java.awt.*;
    import java.awt.datatransfer.*;
    import java.io.*;
    import java.util.*;
    public class Test {
    public static void main (String[] parameters) {
              new Test ().test ();
    private void test () {
    Toolkit.getDefaultToolkit().getSystemClipboard ().setContents (          new mageTransferable ("test.jpg"),
         new ClipboardOwner () {
         public void lostOwnership (                                             Clipboard clipboard,
                             Transferable contents) {}
    private class ImageTransferable implements Transferable {
    private String fileName;
    public ImageTransferable (String fileName) {
    System.out.println(" Checking for the File now");
    if (! new File(fileName).exists ()) {
    throw new IllegalArgumentException ("Can't find image");
    System.out.println(" got the file");
    this.fileName = fileName;
    System.out.println(" returning from constructor");
    public Object getTransferData (DataFlavor flavor) throws UnsupportedFlavorException {
    System.out.println("trying to get the data to be transfered");
    if (! isDataFlavorSupported (flavor)) {
    throw new UnsupportedFlavorException (flavor);
    System.out.println("This is a supported flavor");
    return (Image)Toolkit.getDefaultToolkit().createImage (fileName);
    //               System.out.println(
    public boolean isDataFlavorSupported (DataFlavor flavor) {
    System.out.println("trying to check whether the flavour is supported one");
    DataFlavor[] df= this.getTransferDataFlavors();
    System.out.println(" data flavors " + df);
    boolean result = in(flavor, df);
    return result;
    public DataFlavor[] getTransferDataFlavors () {
    //     "image/x-java-image; class=java.awt.Image"
    DataFlavor df=null;
    System.out.println("trying to get the data flavours");
    df =new DataFlavor("application/x-java-serialized-object; class=java.awt.Image","Image");
    //new DataFlavor("image/x-java-image;class=java.awt.Image","Image");
    System.out.println(" Just going to return & DF found was"+ df);
    DataFlavor[] df2 = new DataFlavor[]{df,DataFlavor.plainTextFlavor,DataFlavor.stringFlavor,DataFlavor.javaFileListFlavor };
    System.out.println(df2.length);
    System.out.println(df2[0]);
    return df2;
    private boolean in (DataFlavor flavor, DataFlavor[] flavors) {
    System.out.println("Im in in");
    int f = 0;
    while ((f < flavors.length) && ! flavor.equals (flavors[f])) {
         f ++;
         System.out.println("Im in in's loop");
    return f < flavors.length;
    But this throws the following exception:
    Exception in thread "main" java.lang.ClassCastException: sun.awt.windows.WImage
    at sun.awt.windows.WDataTransferer.translateTransferable(WDataTransferer
    .java:346)
    at sun.awt.DataTransferer.translateTransferable(DataTransferer.java:245)
    at sun.awt.windows.WClipboard.setContents(WClipboard.java:69)
    at Test.test(Test.java:13)
    at Test.main(Test.java:8)
    Is the dataflavour purely dependent on OS. What can be done to overcome this problem

  • Copy an image into system clipboard takes too much memory

    Our Swing application copies a java.awt.BufferedImage into the system clipboard. Our image has a size of 1024x768 pixels and a depth of 24 bits per pixel.
    The copy from the image to the system clipboard works, but is very slow and takes too much memory. Before the copy, java.exe uses about 30 MB. After the copy, it uses about 90 MB! However, a 1024x768x3 image should consume only 2,4 MB.
    We did some debugging and it seems the AWT library does several copies of our original image in order to copy it in the system clipboard. I guess that each of these copies takes a lot of memory (probably because of a different format from the original image) and is not immediately garbage collected.
    This is a big issue for our application because the JVM throws an OutOfMemoryError when we try to copy a new image to the system clipboard.
    Here is our code. Do you have any idea? Thanks a lot for your help.
    // Create the image
    BufferedImage image = new BufferedImage(1024, 768, BufferedImage.TYPE_3BYTE_BGR);
    Graphics2D g2 = image.createGraphics();
    drawSomething(g2);
    g2.dispose();
    // Put the image into the system clipboard
    ImageSelection handler = new ImageSelection(image);
    Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
    clipboard.setContents(handler, handler);
    * An implementation of Transferable and ClipboardOwner to be used with
    * images.
    public class ImageSelection implements Transferable, ClipboardOwner {
        private static final DataFlavor flavors[] = {DataFlavor.imageFlavor};
        private Image image;
        public ImageSelection(Image imageToCopy) {
            this.image = imageToCopy;
        // Interface ClipboardOwner
        public void lostOwnership(Clipboard clipboard, Transferable transferable) {
            image = null;
        // Interface Transferable
        public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException,
                                                                IOException {
            if (isDataFlavorSupported(flavor)) {
                return image;
            else {
                throw new UnsupportedFlavorException(flavor);
        public DataFlavor[] getTransferDataFlavors() {
            return flavors;
        public boolean isDataFlavorSupported(DataFlavor flavor) {
            return flavor.equals(flavors[0]);
    }

    why dont u use other data structure to store the image , which will take less memory.

  • How to a copy a tif image to system clipboard and paster in MS Word

    import java.awt.image.RenderedImage;
    import java.io.IOException;
    import javax.media.jai.RenderedImageAdapter;
    import util.TIFFFileHelper;
    public class ClipboardSupport implements ClipboardOwner{
         public ClipboardSupport() {
              super();
         public static void main(String[] args) throws IOException {
              ClipboardSupport co = new ClipboardSupport();
              RenderedImage img=co.getTestImage();
              co.copyToClipBoard(img);
         private RenderedImage getTestImage() throws IOException{
              TIFFFileHelper th = new TIFFFileHelper("C:/workspace/AV/src/images/onepageSample.tif");
              th.getPageCountParseFirstPage();
              RenderedImage img = th.getFirstPage();
              return img;
         public void copyToClipBoard(RenderedImage img2){
              Image img=this.getCovertedImage(img2);
              this.copyToClipBoard(img);
         public void copyToClipBoard(Image img){
              Toolkit tkt = Toolkit.getDefaultToolkit();
              Clipboard clipboard = tkt.getSystemClipboard();
              Transferable t = new ImageSelection(img);
              clipboard.setContents(t,this);
         public void lostOwnership(Clipboard clipboard, Transferable contents) {
              System.out.println("ClipboardSupport.lostOwnership() called");
         private Image getCovertedImage(RenderedImage img) {
              RenderedImageAdapter aid = new RenderedImageAdapter(img);
              Image im = aid.getAsBufferedImage();
              return im;
    package util.clipboard;
    import java.awt.Image;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.datatransfer.Transferable;
    import java.awt.datatransfer.UnsupportedFlavorException;
    import java.io.IOException;
    public class ImageSelection implements Transferable {
         private Image img=null;
         DataFlavor dataFlavor = DataFlavor.imageFlavor;
         public ImageSelection(Image img) {
              super();
              this.img=img;
         public DataFlavor[] getTransferDataFlavors() {          
              DataFlavor[] data = new DataFlavor[1];
              data[0]=dataFlavor;
              return data;
         public boolean isDataFlavorSupported(DataFlavor flavor) {          
              if(dataFlavor.equals(flavor)){
                   return true;
              }else{
                   return false;
         public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
              return img;
    }

    done.

  • Need to save the image saved in the System Clipboard in using JDK 1.3.1

    Does anyone know how to use JDK 1.3.1 to take an image saved in the System clipboard and save it to a file using the JPG format?
    I know how it is done in JDK 1.4 using the following code. Unfortunately, the same code does not recognize the image in the clipboard in JDK 1.3.1
    I am using jai-1_1_2_01.
    package clipboard;
    import java.awt.datatransfer.Clipboard;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.datatransfer.Transferable;
    import java.awt.image.RenderedImage;
    import java.awt.Toolkit;
    import java.awt.datatransfer.UnsupportedFlavorException;
    import java.io.IOException;
    import java.io.FileOutputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import javax.media.jai.JAI;
    import javax.media.jai.RenderedOp;
    public class clipboard
    {  private File tempFile = null;
    * @param args
    static int BUFFER_SIZE = 65536;
    public static void main(String[] args)
    {  clipboard clip = new clipboard();
    clip.writeImageFromClipboard();
    public void writeImageFromClipboard()
    {  Clipboard            clip = Toolkit.getDefaultToolkit().getSystemClipboard();
    Transferable transferable = clip.getContents(null);
    RenderedImage img = null;
    FileOutputStream fileOutStr = null;
    BufferedOutputStream bufOutStr = null;
    DataFlavor [] dataFlavors;
    File tempFile;
    int
    byteCount;
    String [] strArr;
    dataFlavors = transferable.getTransferDataFlavors();
    System.out.println("clip=" + clip.getName());
    System.out.println("Transferable=" + transferable);
    for (int i = 0; i < dataFlavors.length; i++)
    {  System.out.println("dataFlavours[" + i + "]=" + dataFlavors.toString());
    if (transferable.isDataFlavorSupported(new DataFlavor("image/x-java-image; class=java.awt.Image", "Image")))
    { try
    { img = (RenderedImage) transferable.getTransferData(new DataFlavor("image/x-java-image; class=java.awt.Image", "Image"));
    if (this.tempFile == null)
    { this.tempFile = File.createTempFile("__TMP_IMG__", ".jpg");
    System.out.println(this.tempFile.getCanonicalPath());
    fileOutStr = new FileOutputStream(this.tempFile);
    bufOutStr = new BufferedOutputStream(fileOutStr);
    // Encode the file as a JPG image.
    JAI.create("encode", img, bufOutStr, "JPEG", null);
    catch (UnsupportedFlavorException e)
    { e.printStackTrace();
    catch (IOException e)
    { e.printStackTrace();
    finally
    { if (bufOutStr != null)
    { try
    { bufOutStr.flush();
    bufOutStr.close();
    catch (IOException e)
    if (fileOutStr != null)
    { try
    { fileOutStr.flush();
    fileOutStr.close();
    catch (IOException e)
    else
    { System.out.println("Not an image!");

    The login  you connected to the server  and run the above statement does not have permissions to operate  on this path "C:\Users\ISLLCdba\Desktop\MAA
    PROFILE PICTURES\"
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Sending an image to the system clipboard

    I've been trying to figure out how I can send an image to the system clipboard. At this state I'm beginning to think it's just not possible. This is the case:
    I've got an applet running in a browser which creates a new window. I now want to copy the contents of this window to the system clipboard. So far I can only transfer text to the clipboard, but what I need is to copy a screenshot of the new window to the system clipboard.
    Does anybody know how this can be done with Java or any kind of scripting language?

    Since I already found the answer I rewarded 2 people for there help. This is the answer I found. Some code was found on the JDC Forum, but I can't remember who posted it or where I found it. So sorry that I can't give him credit...
    Using JDK 1.4 the code could look like this:
    -> This is how the policy file should look like:
    grant
    { permission java.awt.AWTPermission "accessClipboard";
    permission java.awt.AWTPermission "createRobot";
    permission java.awt.AWTPermission "readDisplayPixels";
    -> This is the code for the applet:
    import java.awt.*;
    public class ClipboardTest extends java.applet.Applet {
    public void init() {
    initComponents();
    initialiseer();
    private void initComponents() {
    setLayout(new java.awt.BorderLayout());
    public void initialiseer() {
         // Here I create the actual frame that I can send to the clipboard
    MySystemClipboard cb = new MySystemClipboard();
    cb.setBounds(200,200,200,200);
    cb.setVisible(true);
    -> And here is the code for MySystemClipboard:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.awt.datatransfer.*;
    public class MySystemClipboard extends Frame implements ActionListener,
    ClipboardOwner
    private Button myButton;
    private Clipboard myClipboard;
    private PrettyPicture myPicture;
    public MySystemClipboard()
    add(myButton = new Button("Clip"), BorderLayout.SOUTH);
    add(myPicture = new PrettyPicture(), BorderLayout.CENTER);
    myButton.addActionListener(this);
    myClipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
    public void actionPerformed(ActionEvent anEvent)
    try
    ClipImage ci = new ClipImage(new Robot().createScreenCapture(getBounds()));
    myClipboard.setContents(ci, this);
    catch (AWTException ae){}
    public void lostOwnership(Clipboard clipboard, Transferable contents)
    private class ClipImage implements Transferable
    private DataFlavor[] myFlavors;
    private BufferedImage myImage;
    public ClipImage(BufferedImage theImage)
    myFlavors = new DataFlavor[]{DataFlavor.imageFlavor};
    myImage = theImage;
    public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException
    if (flavor != DataFlavor.imageFlavor)
    throw new UnsupportedFlavorException(flavor);
    return myImage;
    public DataFlavor[] getTransferDataFlavors()
    return myFlavors;
    public boolean isDataFlavorSupported(DataFlavor flavor)
    return (flavor == DataFlavor.imageFlavor);
    private class PrettyPicture extends Panel
    public PrettyPicture()
    setBackground(Color.gray);
    add(new Button("Button1"), BorderLayout.NORTH);
    add(new Button("Button2"), BorderLayout.CENTER);
    add(new Button("Button3"), BorderLayout.SOUTH);
    Hope this can help some other people

  • [SOLVED]possible to make live image of a current running arch system?

    Hi Friends!!!. Is it possible to make live iso image of a current running arch system? are there any tools available for that?(I want to do this cause When i install a new arch system, I want to remain my own customizations intact)
    Last edited by Pranavg1890 (2012-10-14 07:29:58)

    OK, so after reading the posts, I think that this is not possible.but i think this sould be feature which should be researched upon cause everytime I install arch on a new machine(arch reinstalls on same machine are very rare cause it's a rolling release and has excellent recovery tools) I have to spend a 5-6 hours of time configuring the system.so, i think it should be a feauture that should be worked upon.for eg. like you could chroot into the iso created and then replace the deafult configs by the one on your system or a system scanner which scans the changes on the system with respect  to default arch installation and make the necessary changes to the live image.Thanks friends for your replies. I mark this thread as solved.

  • 'Your system has run out of application memory'?!

    I've seen many users experiencing this same problem throughout the community, but none of the fixes have given me a permanent solution. Details of the machine are below, as well as what happens when the problem hits/triggers.
    MBP Retina running OS X Yosemite 10.10.2 (occurred in previous versions as well, thought the latest update would help but it didn't)
    15-Inches Mid 2014 with 16 GB of Ram
    Been using this Mac for good 6 months now, and one fine day of normal usage the whole system seems really laggy and slow and all of a sudden i'm unable to access anything and barely move my mouse. Then, a window pops out, telling me "Your system has run out of application memory", gracefully showing me that I have to force quit all my programmes for me to just stare at my desktop in utter disappointment.
    I've been using Yosemite for awhile now (updated few days since the release) and haven't encountered any major issues, this being the first. Reading through many threads many have said that the problem lies with opening the Mail app, yet I haven't touched that app in months. I've also tried resetting the PRAM on my machine when it happens and the problem comes back again after several minutes of normal usage (iTunes, App Store). Checking the memory usage with the Memory Clean app, it tells me I'm down to a measly '15.58 MB' of memory, and it justfluctuates at that until I give it a restart again. This can't keep happening - I can barely use the Mac for 10 minutes without having to restart it, only to be able to use it only again for another 10 minutes.
    Opening Activity Monitor tells me that mds_stores is the main root of the problem, yet I can't seem to shut the process down. I've googled and many say that mds_stores is spotlight indexing, but taking up all 16 GB of ram? That shouldn't be the case. Is there a fix to this? Does Apple know of its existence?
    Included some screenshots below:

    Step 1
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Triple-click anywhere in the line below on this page to select it:
    syslog -F '$Time $Message' -k Sender mdworker -o -k Message Rne Norm -k Sender mds | tail | pbcopy
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign ($) to appear.
    The output of the command will be automatically copied to the Clipboard. If the command produced no output, the Clipboard will be empty. Paste into a reply to this message. 
    The Terminal window doesn't show the output. Please don't copy anything from there.
    If any personal information appears in the output, anonymize before posting, but don’t remove the context.
    Step 2
    Enter the following command as in Step 1 and post the output:
    mdutil -as 2>&- | pbcopy
    You can then quit Terminal.
    Step 3
    Launch the Console application in the same way you launched Terminal. In the Console window, look under the heading DIAGNOSTIC AND USAGE INFORMATION on the left for crash reports related to Spotlight. If you don't see that heading, select
              View ▹ Show Log List
    from the menu bar. A Spotlight crash report has a name beginning in "mds" or "mdworker" and ending in ".crash". Select the most recent such report, if any, from the System and User subcategories and post the entire contents—the text, please, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post any other kind of diagnostic report, such as hang logs—they're very long and not helpful.

  • Writing to the System clipboard

    This company uses LabVIEW 2012 and LabWindows 2010 in an Aerospace environment. The use of older versions is done to have commonality with their facilities across the globe. Thus, I cannot get them to upgrade.
    On their new test station, they have 14 serial ports to communicate with the unit under test. I have developed a LabVIEW serial port interface program that will allow them to communicate with those serial ports. I have the ini file configured to allow the user to run multiple instances of the executable, for as many ports as they desire, during their testing. One option that they requested is the ability to right click the mouse, have a menu display to select copy or copy all of the data to the clipboard so that they can paste the received data into a test report. I used the LabVIEW App Invoke Node function Write to Clipboard and Read From Clipboard to perform the task. However, I have the issue that this works on some instances and does not work on other instances of the executables. Since the code is the same, the user enters which port to connect to, I do not understand why I have this issue. It works fine on my PC which only has a single COM port.
    I decided to write two LabWindows functions to read and write to the clipboard using ClipboardGetText and ClipboardPutText. I call those dll functions from LabVIEW. The first call to the function ClipboardPutText works in the sense that the data is placed into the clipboard. However, I immediately get a fatal error and the process stops. (I did not save a screen image and the test stations are in use at this time). After that, none of the other instances will copy the data and they all result in a fatal error and stop. This is repeatable as I restarted the software numerous times as I tried to determine the cause.
    Since I do not have access to the code for the clipboard functions, I cannot determine if I need to configure something else related to the clipboard or the process attempting to read/write from/to the clipboard. I will continue to search but wanted to ask the experts in control of the clipboard software to determine if they have any recommendations on what may need to be added.
    For LabWindows, the only other call that I performed was a free command after I executed the ClipboardGetText, if the pointer to the text was not NULL.
    I will post this in both the LabVIEW and LabWindows discussion boards in case one or the other has a solution.
    Thank you for your help.
    I can provide a zip file, containing the source code, to NI personnel if you provide an email address. Since I am a contractor, I am not sure if the company’s policy allows global posting of their code, although I may be able to reduce the code to a minimum example, if necessary.

    I have done more testing in an attempt to clarify the error condition. I upgraded to LabVIEW 2014 on a Windows 7 SP1 system. I have enclosed some screen shots to show what I am doing.
    My software allows multiple copies, 14 in this case, versions of the executable to run at one time. The software controls serial ports. The enclosed image of the front panel, LabVIEW window.png, indicates the COM port, baud rate, and version at the top of the window. This first small control allows the user to enter a command to send to the port. The large bottom indicator displays the data received on the port. I have menu items, pressing the right mouse button, that allows the user to clear all of the data, copy selected data, or copy all data. I have enclosed images of the copy, copy all, write to clipboard, and read serial port parts of the code. I was only copying small amounts of data, perhaps less than 256 bytes.
    Here’s what I have noticed:
    If I execute the code on my desktop computer, only 1 COM port, everything works fine. The copy and copy all will place the data into the system clipboard which allows the pasting of the data into Notepad.
    If I execute the code on the test station, opening all 14 ports, we are using the NI serial card for all of the additional ports, the code works fine, as in item 1, for a couple of the executables but not the rest.
    If I select a subset of the data being displayed, highlighted in blue by LabVIEW, then right click the mouse selecting the copy, the blue highlighting goes away but the data is copied to the clipboard allowing me to paste into Notepad.
    If I right click the mouse selecting copy all, the data is NOT copied to the system clipboard so that I cannot paste it into Notepad.
    In the Write to Clipboard function, I write to the clipboard and then read the clipboard. I added code to display, in a popup window, what was written to the clipboard and what was read from the clipboard. The data was the same although the data was not on the system clipboard so that I could paste it into Notepad.
    I tried to select a subset of the data being displayed and then right clicking the mouse to do a copy all to see if that made a difference. It did not.
    I tried to make the Write to Clipboard function re-entrant to test that theory. Not change in the behavior.
    At one point, I tried to use LabWindows. I used the LabWindows clipboard calls and then tried calling the Microsoft clipboard functions directly. While those functions worked in LabWindows without a problem, I would get executable crashes when I tried to call my LabWindows functions from LabVIEW. If I commented out the actually code part, the call to the functions would return without crashing the executable. The issue was not in how the LabWindows functions were being called but something in the clipboard calls themselves. So, I decided that making a call using LabWindows offered nothing that I could use. I returned to using only LabVIEW and updated to 2014 to determine if that might solve the issue. No luck so far.I do not understand why, when I call the LabVIEW function to write to the clipboard, that it does not work for every executable of the multiple instances. Is there some other function that needs to be called prior to writing to the clipboard due to having multiple instances? Why does selecting a subset work when I do the copy but not when I copy all. If I am passing the data to write to the clipboard, why does selecting a subset and the copying only that subset work but the copy all does not? I do not understand how LabVIEW handles multiple instances and is they are truly considered separate processes.
    I seldom use these forums as I can get most of the code that I write to work as expected. Thank you for all of your help and suggestions.
    Attachments:
    LabVIEW window.png ‏25 KB
    Copy Menu Item.png ‏39 KB
    Copy ALL Menu Item.png ‏33 KB

  • [Forum FAQ] Reporting Service Point cannot be installed on a Site System Server running SQL Server 2012 SP1

    Symptom: When you install Reporting Service Point role on a Site System Server running SQL Server
    2012 SP1, you may encounter an issue that the Reporting Service Point role cannot be installed. The error log “srsrpMSI.log” and “srsrpsetup.log” may throw the error as shown in Figure 1 and Figure 2.
    03:32:03:764]:
    MainEngineThread is returning 1618
    Figure 1: Error -1
    <03/03/14 03:32:03>
    srsrp.msi exited with return code: 1618
    Figure 2: Error -2
    Reason: All the two logs indicate an error return code 1618. From the KB below you may know what
    the return code means.
    ERROR_INSTALL_ALREADY RUNNING 
    1618
    Another installation is already in progress. Complete that installation before proceeding with this install.
    KB link:
    http://support.microsoft.com/kb/290158 “it is related to an Office Suite KB, anyway, the MSI return code is the same meaning”
    You can look into Resource Manager and Event Viewer to find the other currently running MSI installation. You may get a warning in Event Log that means the MSI wants to install a SQL Server
    related Component (Figure 3). The Resource Manager confirms this (Figure 4).
    Event Log:
    Event ID: 1004
    Source: Msinstaller
    Level: Warning
    Detection of product '{A7037EB2-F953-4B12-B843-195F4D988DA1}',
    feature 'SQL_Tools_ANS', component '{0CECE655-2A0F-4593-AF4B-EFC31D622982}' failed.  The resource '' does not exist.
    Figure 3: Event Log
    Figure 4: Resource Manager
    Resolution: the error is exactly what the following KB describes.
    KB Link:
    http://support.microsoft.com/kb/2793634
    After we resolve the SQL Server 2012 issue, the Reporting Service Role is installed successfully.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    This implies that ODP.NET does NOT need to be installed on a client. However, I cannot find OraOPs9.dll on a machine with Client Release 9.2 installed. Should OraOps?.dll automatically come with a Client installation of 9.2 or higher?
    ODP.NET needs to be installed on the client. OraOps9.dll is part of ODP.NET, not the Oracle Client.
    Also, if an application is built with the 10g ODP.NET, can it be run from a machine with OraOps9.dll?
    If an application is built with 10g ODP.NET, it can be run with 9.2 ODP.NET as long as you do not use any 10g APIs. The new features in 10g ODP.NET are included in the doc and the ODP.NET FAQ for your reference.

  • Applet access to system Clipboard

    Hi all:
    I am creating a customized version of the mud telnet application for a customer. They have requested cut/paste functionality and I have been able to provide this capability. The problem is the applet cannot get access to the system clipboard so all cut/paste functions can only occur within the applet. I am able to access the system clipboard by creating a java.policy file and setting a permission. The problem is that most of the workstations, and a good number that will be using home computers running Win 98. They don't want the users to have to download the new JRE from Sun (although I know this works). I am looking for a way to creat a JAR file using the old JDK 1.1 (or the current toolkit if it is possible) that will allow access from the Applet to the System Clipboard. I have search the web for an answer, with no success. Can anyone give me any suggestions?
    Anybody had to do the same thing before?
    Thanks.
    John Kreiner

    I know this is an old thread, but I thought I would answer it.
    To access the clipboard via an applet, you need to use JavaScript.
    The first thing to do is to create a class that uses reflection to use the JSObject. The reason why reflection is used is because it is a pain (ITA) to specify a compatible binary for eacy java version (e.g. java40.jar, plugin.jar, jaws.jar, etc). Here is the class:
    import java.lang.reflect.*;
    import java.applet.Applet;
    public class JavaScript {
         public static void call(Applet applet, String methodName, Object[] param) {
              try {
                   Class js = Class.forName("netscape.javascript.JSObject");
                   Method callMethod = js.getMethod("call", new Class[] { String.class, Object[].class });
                   callMethod.invoke(getWindow(applet), new Object[] { methodName, param});
              } catch (Throwable t) {}
         public static Object getWindow(Applet applet) {
              Object o = null;
              try {
                   Class js = Class.forName("netscape.javascript.JSObject");
                   Method getWindowMethod = js.getMethod("getWindow", new Class[] { Applet.class });
                   o = getWindowMethod.invoke(null, new Object[] { applet });
              } catch (Throwable t) {}
              return o;
    }Now, when you want to copy something to the clipboard, you will do:
    JavaScript.call(someApplet, "copyToClipboard", text);
    BUT the "copyToClipboard" function has not been defined yet. This will be a JavaScript function in the html:
    <script language="JavaScript1.1">
    function copyToClipboard(text) {
         document.myForm.myInput.value = text;
         var rng = document.myForm.myInput.createTextRange();
         rng.execCommand("RemoveFormat");
         rng.execCommand("Copy");
    </script>And one last thing is that a JavaScript text component is required in order to create the "rng" variable. To do this, use a hidden field in the html:
    <form name="myForm">
         <input name="myInput" type="hidden">
         </input>
    </form>

  • Copying to system clipboard

    i m tryin to copy an image to the system clipboard,. the syntax being the usual
    Toolkit.getDefaultToolkit().getSystemClipboard().setContents(selectedImage,null);
    i m not invoking the method      javax.swing.SwingUtilities.invokeLater(new Runnable(){
              public void run()
    will that create a problem? cuz i can run it normally wen i m not

    will that create a problem?Try it and see.

  • System() from a multi-threaded app

    The man page for system(3S) states that its MT-Level is "unsafe." Nonetheless we need to call system() from a multi-threaded application. At present we "just go ahead and do it," and of course it doesn't work well. I'm not entirely sure of the details of the failure -- it's more a colleague's baby than mine -- but I believe the system() call often fails to complete ("hangs").
    Is there a thread-safe equivalent-or-replacement for system()? Surely the need to launch other applications from a multi-threaded application is commonplace today? How is it done safely-and-correctly?

    Hi,
    system() is not thread safe because it internally uses vfork() system call which in turn is not MT-safe . When you do a vfork()/fork1() in threaded applications only the thread which issues the call gets duplicated in the child process , which could result in dead lock problems . Solution of running system() under the protection of a lock may not help to avoid this problem.
    If you're using Solaris thread library , fork() + exec() is a safe substitute for system() . If you are using Posix library , use pthread_atfork() to make sure that you handle the locks properly before/after forking.
    Hope this helps.
    Thanks,
    Prajeesh

  • HP Deskjet 3050A J611 series - error message -Bad image windows\system 32\d3d 10 warp.dll

    I use the HP Deskjet 3050A J611 series printer with my laptop and a desktop PC.  It works fine with the laptop but when I installed the software onto the desktop the window error message Bad Image Windows\ System 32\d3d 10 warp.dll kept popping up every few minutesd.  By a process of ilimination I discovered that it was the Photo Creations that was causing the problems, when I removed it all was good and I was able to use the printer.  The only problems is that I now cannot print photos from my pc.  I have windows 7.
    Can anyone help please?

    Hi Chris.
    That error message comes from Direct3D, which is part of the DirectX software in Windows. It appears that part of the DirectX environment on your computer is corrupt. Microsoft provides a diagnostic tool that should help you sort this out. Please see http://windows.microsoft.com/en-us/windows-vista/run-directx-diagnostic-tool
    If that does not solve the issue, you may want to reinstall the device driver for your graphics adapter.
    When all's running smoothly, you can reinstall HP Photo Creations to print again. Our customer support team would be happy to help with the reinstallation. You can reach them at www.hp.com/global/us/en/consumer/digital_photography/free/software/support-form.html
    Hope this helps,
    RocketLife
    RocketLife, developer of HP Photo Creations
    » Visit the HP Photo Creations Facebook page — news, tips, and inspiration
    » See the HP Photo Creations video tours — cool tips in under 2 minutes
    » Contact Customer Support — get answers from the experts

  • Bridge to Photoshop Image Processor won't run

    I'm using Photoshop CS3 Extended - V 10.0.1 and Bridge V 2.1.1.9
    I'm trying to run some photos through Image Processor via Bridge. After selecting all of the photos, selecting Tools > Photoshop > Image Processor, Photoshop opens, but the Image Processor doesn't run.
    I've tried processing other photos in other folders and it works fine. Then I tried processing the problematic folder on a different computer with no luck. There just seems to be an issue with this group of photos.
    I check the information on the photos and they're not locked or anything. I'm not sure what else to do. Any ideas?

    Try run the Image Processor directly from Photoshop menu File->Scripting. See if you can select the folder and run the processing.
    What is the special with that folder? such as size, permission, special name or special file?

Maybe you are looking for

  • Itunes not working when trying to sync ipad and iphone 4

    Hello I have been having a number of issues with itunes not working. When I try to sync my ipad or iphone 4 itunes locks up does not see my devices connected I have to reboot 5 times before I can get them to be seen in itunes. Also when I am able to

  • Boot camp outside mac

    Hi, Does anyone know if bootcamp can create a partition on an external hard drive so i don't need to sacrifice any mac space? Also i have a new macbook which has no sign of boot camp in utilities folder,what is the best route to get it? a down load o

  • Why is my macbook air so slow?

    why is my macbook air so slow?

  • Web service unauthorized 401

    Hi, I have created a web service from a simple helloworld function module in Netweaver 7.0. I created the service definition with basic authentification (User/pwd) security. Now , my user has roles SAP_BC_WEBSERVICE_CONSUMER and SAP_BC_WEBSERVICE_ADM

  • Left Arrow Key Closes during Rename

    Has anybody else noticed sometimes that when you're renaming a file and using the left arrow key to move through the text, the Finder closes the editability of that file name? As you proceed to use the left arrow key, it would close subfolder after s