Clipboard?

Can anyone provide a link for a tutorial on how to use clipboard objects? I am trying to enable copy and paste functions in my application.
Thanks in advance,
AJ

import java.awt.datatransfer.*;
void setClipboardContents(String aString){
         StringSelection stringSelection=new StringSelection(aString);
         Clipboard clipboard=Toolkit.getDefaultToolkit().getSystemClipboard();
         clipboard.setContents(stringSelection,null);
     String getClipboardContents(){
         String result = "";
         Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();         
         Transferable contents = clipboard.getContents(null);
         boolean hasTransferableText=(contents!=null) &&
                contents.isDataFlavorSupported(DataFlavor.stringFlavor);
         if(hasTransferableText){
                try {
                  result=(String)contents.getTransferData(DataFlavor.stringFlavor);
                }     catch(Exception ex){}
         return result;
       }

Similar Messages

  • Copying text to the clipboard in AVDocDidOpen event handler causes Acrobat 9 to crash

    I'm trying to copy the filename of a document to the clipboard in a plugin with my AVDocDidOpen event handler.  It works for the first file opened; however when a second file is opened, Acrobat crashes.  The description in the application event log is: "Faulting application acrobat.exe, version 9.1.0.163, faulting module gdi32.dll, version 5.1.2600.5698, fault address 0x000074cc."
    I've confirmed that the specific WIN32 function that causes this to happen is SetClipboardData(CF_TEXT, hText);  When that line is commented out and remaining code is left unchanged, Adobe doesn't crash.
    Is there an SDK function that I should be using instead of WIN32's SetClipboardData()?  Alternately, are there other SDK functions that I need to call be before or after I call SetClipboardData()
    Bill Erickson

    Leonard,
    I tried it with both "DURING, HANDLER, END_HANDLER" and "try catch," as shown below.  However, it doesn't crash in the event handler; it crashes later, so the HANDLER/catch block is never hit.
    The string that's passed to SetClipboardData() is good, because I'm able to paste it into the filename text box of the print dialog when I try to create the "connector line" PDF.  I also got rid of all the string manipulation and tried to pass a zero-length string to the clipboard but it still crashes.
    Here's the code:
    ACCB1 void ACCB2 CFkDisposition::myAVDocDidOpenCallback(AVDoc doc, Int32 error, void *clientData)
        PDDoc pdDoc = AVDocGetPDDoc(doc);
        char* pURL = ASFileGetURL(PDDocGetFile(annotDataRec->thePDDoc));
        if (pURL)    {
            if (strstr(pURL, "file://") && strstr(pURL, "Reviewed.pdf")) {
                // Opened from file system so copy filename to clipboard for connector line report
                char myURL[1000];
                strcpy(myURL, pURL);
                ASfree(pURL);    // Do this before we allocate a Windows handle just in case Windows messes with this pointer
                pURL = NULL;
                HGLOBAL hText = GlobalAlloc(GMEM_MOVEABLE, 1000);
                if (hText)    {
                    try
                        // Skip path info and go right to filename
                        char *pText = (char *)GlobalLock(hText);
                        char *pWork = strrchr(myURL,'/');
                        if (pWork)    {
                            strcpy(pText, pWork+1);
                        } else {
                            strcpy(pText, myURL);
                        char *pEnd = pText + strlen(pText);    // Get null terminator address
                        // Replace "%20" in filename with " "
                        pWork = strstr(pText, "%20");
                        while (pWork)    {
                            *pWork = ' ';
                            memmove(pWork+1, pWork+3, (pEnd - (pWork+2)));
                            pWork = strstr(pText, "%20");
                        // Append a new file extension
                        pWork = strstr(pText, ".pdf");
                        *pWork = 0;    // truncate the string before ".pdf"
                        strcat(pWork,".Connectors.pdf");
                        GlobalUnlock(hText);     // Must do this BEFORE SetClipboardData()
                        // Write it to the clipboard
                        OpenClipboard(NULL);
                        EmptyClipboard();
                        SetClipboardData(CF_TEXT, hText);     // Here's the culprit
                        CloseClipboard();
                        GlobalFree(hText);
                    } catch (char * str) {
                        AVAlertNote(str);
            if (pURL)
                ASfree(pURL);

  • Pasting Image  from Mac clipboard to Java Based Application.

    Hi,
    I am working on "iMac 10.2.7". I need to paste an image from other
    application using "Java version 1.4.1". I am trying to retrieve the image
    from the system clipboard after it is copied from some other application. I
    am pasting the code which illustrates my requirement. It works fine on
    windows. But does not work on Mac.
    On Mac it does not cross the supported data flavor check
    (clipData.isDataFlavorSupported(DataFlavor.imageFlavor) where clipData is
    the Transferable object). It seems Mac has some InputStream instead of Image
    in the clipboard when some image is copied. I tried to read that InputStream
    using ImageIO.read(java.io.InputStream). But that is also returning null.
    Thanks
    Santanu
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import java.awt.datatransfer.*;
    import javax.swing.*;
    public class ClipboardTest extends JFrame implements KeyListener{
         JLabel label;
         static Toolkit kit = null;
         static Clipboard clipboard = null;
         public static void main (String arg[]) {
              kit = Toolkit.getDefaultToolkit();
              clipboard = kit.getSystemClipboard();
              JLabel l = new JLabel();
              JButton button = new JButton("Paste from clipboard");
              final ClipboardTest ct = new ClipboardTest(l);
              ct.getContentPane().add(l,BorderLayout.CENTER);
              ct.getContentPane().add(button,BorderLayout.SOUTH);
              ct.setVisible(true);
         button.addActionListener(
              new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        pasteImage(ct.label);
         button.addKeyListener(ct);
         public ClipboardTest (JLabel l) {
              label = l;
         public static void pasteImage(JComponent jComp) {
                   jComp.setTransferHandler(new ImageSelection());
                   TransferHandler handler = jComp.getTransferHandler();
                   Transferable clipData = clipboard.getContents(null);
              if (clipData != null) {
              if (clipData.isDataFlavorSupported(DataFlavor.imageFlavor)) {
                   handler.importData(jComp, clipData);
         //Key listener methods
         public void keyPressed(KeyEvent e) {
         int c = e.getKeyCode();
         if (c == 86) {
              if (e.isControlDown()) {
                   pasteImage(label);
         public void keyReleased(KeyEvent e) {}
         public void keyTyped(KeyEvent e) {}
    class ImageSelection extends TransferHandler implements Transferable {
         /* DataFlavor instance that holds imageflavor value*/
         private static final DataFlavor flavors[] = {DataFlavor.imageFlavor};
         private Image image;
         public boolean importData(JComponent comp, Transferable transferable) {
         try {
         if (transferable.isDataFlavorSupported(flavors[0])) {
         image = (Image)transferable.getTransferData(flavors[0]);
                   if (comp instanceof JLabel) {
                   ((JLabel)comp).setIcon(new ImageIcon(image));
                   comp.repaint();
                   return true;
         } catch (Exception ignored) {
              ignored.printStackTrace();
         return false;
         // Transferable Interface methods
         public Object getTransferData(DataFlavor flavor) {
         if (isDataFlavorSupported(flavor)) {
         return image;
         return null;
         public DataFlavor[] getTransferDataFlavors() {
         return flavors;
         public boolean isDataFlavorSupported(DataFlavor flavor) {
         return flavor.equals(flavors[0]);

    Here are two commercial options:
    JTwain + JSane
    http://asprise.com/product/jtwain/index.php
    Morena
    http://www.gnome.sk/Twain/jtp.html
    Haven't tested them, so don't no how good they are, nor how easy they are to use on multiple platforms.

  • How to extract Slide data in 3rd part application from clipboard

    I need to be able to copy/paste or drag/drop from PowerPoint into another application (C# WPF). In my OnDrop method the DragEventArgs Data has these formats:
            [0]    "Preferred DropEffect"    string
            [1]    "InShellDragLoop"    string
            [2]    "PowerPoint 12.0 Internal Slides"    string
            [3]    "ActiveClipBoard"    string
            [4]    "PowerPoint 14.0 Slides Package"    string
            [5]    "Embedded Object"    string
            [6]    "Link Source"    string
            [7]    "Object Descriptor"    string
            [8]    "Link Source Descriptor"    string
            [9]    "PNG"    string
            [10]    "JFIF"    string
            [11]    "GIF"    string
            [12]    "Bitmap"    string
            [13]    "System.Drawing.Bitmap"    string
            [14]    "System.Windows.Media.Imaging.BitmapSource"    string
            [15]    "EnhancedMetafile"    string
            [16]    "System.Drawing.Imaging.Metafile"    string
            [17]    "MetaFilePict"    string
            [18]    "PowerPoint 12.0 Internal Theme"    string
            [19]    "PowerPoint 12.0 Internal Color Scheme"    string
    The "PowerPoint 14.0 Slides Package" is a byte array... can this be converted into Slides?
    If not how would I go about getting high-resolution images + slide text from a drag/drop?
    [Originally posted here: http://answers.microsoft.com/en-us/office/forum/office_2013_release-powerpoint/how-to-extract-slide-data-in-3rd-part-application/a0b5ed64-eb77-49bb-bf44-e0732e23a5eb]

    What I'd like to do:
    Open PowerPoint
    In PPT open a presentation
    In PPT select a slide
    Drag it to my 3rd party WPF application
    In the 3rd party WPF application drop handler get the slide data (text, background image, etc...).
    When I do this I get the DragEventArgs Data (the clipboard data) and it has the 20 supported formats I listed in the 1st post. From these formats #4 seemed like it could have some useful info.
    WPF
    <Window x:Class="PowerPointDropSlide.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525" AllowDrop="True" Drop="UIElement_OnDrop" DragOver="UIElement_OnDragOver">
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="LightBlue">
    <TextBlock Text="Drop something here!"/>
    </Grid>
    </Window>
    Handlers:
    public void UIElement_OnDragOver(object sender, DragEventArgs e)
    public void UIElement_OnDrop(object sender, DragEventArgs e)
    string[] supportedFormats = e.Data.GetFormats();
    object pptSlidesPackage = e.Data.GetData("PowerPoint 14.0 Slides Package");

  • 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

  • How can I get the image data from Clipboard with LV

    Anybody knows How can get the image data after pressd "print screen button" with LV?
    I want to program a software which can save a image as a bmp or jpeg etc, and the image data is from pressed print screen button. 
    How to get it out from clipboard. I am trapping about. thanks in advance.
    Try to make everything Automatic

    You can have a look at Rolf Kalbermatter's post here (give him stars) or, if you're using scripting, you can use the Application class Get Clipboard Image method.
    Try to take over the world!

  • Problem with Clipboard on iOS

    Hello,
    i have a problem with Clipboard on iOS. My test code:
    var ts:String = "This is a test string for clipboard...";
    Clipboard.generalClipboard.setData(ClipboardFormats.TEXT_FORMAT, ts);
    This code is OK on Android or Windows. Test string is in clipboard and i can paste it on other app. But on iOS not. setData return true, but text is not in clipboard.
    Any ideas?
    Thaks

    Hi,
    Looks like it's a bug with iOS AIR, could you please open a bug at bugbase.adobe.com
    -Thanks
    Pahup

  • I am trying to take a picture of a web page and paste on a one drive powerpoint. I tryed pressing the print screen button, and pasting. But it is giving me message saying that my browser can not fine the clipboard, and I need to use the keyboard shortcuts

    I need to take a picture of a web page, insert it onto a powerpoint online, and crop the picture. I am pressing the print screen button, and right cliking paste. But I am getting the warning message saying that my browser can not use the clipboard, and I am unsure of how to take a picture, then paste it, and crop it all on to a power point.

    http://portableapps.com/apps/internet/firefox_portable/localization#legacy36

  • How do I enable the clipboard options on my MacBook Pro?

    I need to post information into a discussion thread for class. I copied the information from Pages and I tried to paste the information in the compose section of the discussion board. Every time I try this an error message pops up on my screen...
    Copy, Cut, Paste is disabled in your Mozilla browser. You can use keyboard shortcuts instead or visit http://www.mozilla.org/editor/midasdemo/securityprefs.html for more information on how to grant access to the clipboard. However, when I proceed to this website there isn't anything that's helpful to me. Help!!!!

    ''Samarion22 wrote:''
    You can use keyboard shortcuts instead
    You can press '''Command + V''' on your keyboard to paste.
    * [[Keyboard shortcuts - Perform common Firefox tasks quickly]]
    ''Samarion22 wrote:''
    visit http://www.mozilla.org/editor/midasdemo/securityprefs.html
    If you absolutely need to grant websites access to your clipboard, you can try the following extension.
    * https://addons.mozilla.org/firefox/addon/allowclipboard-helper/

  • Label "Customer" shows in Activity Clipboard shows both Customer & Contact

    In CRM 4.0 we were able to enhance this so contact record would show as 'contact' instead of  'customer' in the activity clipboard.
    In 5.0 this seems harder to do.  Have played with config & development but no luck so far.
    Any thoughts on how to achieve? this is a B2B scenario.

    on 7.0 now.

  • How do I load a picture from the clipboard (either Windows clipboard or Labview clipboard) into image data that can then be processed in Labview?

    I want to load a picture from the Windows clipboard (and if not possible, then from the Labview clipboard) into actual numerical image data so that it can be processed in lab view. When I'm at the main screen where I can add controls, I see a section of controls called "Vision" in the tool bar where all the different controls can can be added from. When I go to the control called "Image" and put that on my form, and then look at the flowchart/blockdiagram programing window to see what inputs and outputs it has, I only see one output, and no inputs. And when I right click on it, I see NO way to load an image into the Image control. PLEASE help me.
    Message Edited by Ben321 on 11-09-2008 04:32 PM

    Hi Ben,
    National Instruments has an image processing software called Vision and although I am not completely sure, I think the controls that you found in the control pallet are used in conjunction with the software. Depending on what kind of image processing you want to conduct in LabVIEW, you might want to consider purchasing that product.
    If cost is an issue, there are functions in LabVIEW which allows you to take in image files and process them. However, please keep in mind that the capabilities are limited.
    Images should be loaded onto LabVIEW not via the clipboard but through loading it from folders or directories. (There might be a way to and so if you find a way please let me know! I would like to know myself =D) If you open the function pallet by right clicking on the block diagram, in the programming folder you should find a directory called "Graphic and Sound". There, you'll find functions in which allows you to process images.
     In the "Graphic Type" directory there should be a function called Read JPEG file.vi. There are also others which allows you to read png and bmp files. Please note that there are functions which write as well. Set a file path on the block diagram and inside the "Grahic and Sound" there is a "Picture Function" directory and inside there, there should be a function called "Draw Flattened Pixmap.vi" That changes the image into a format where you can process on LabVIEW. Inside the "Picture Function" directory there are several functions which allows you to process the specified image. Play around with it and see how it goes. And don't forget to Write the file in the end to save any changes.
    I hope this helps
    National Instruments Japan
    Applications Engineer Taiki Hoshi

  • JTable and clipboard...

    Hi all!
    I'm trying to copy data from JTable to system clipboard. Here's my code that is
    supposed to do that except it doesn't work. Nothing happens. The system is
    Windows, rigth click invokes menu with only one position - COPY, which is served
    by a appopriate ActionListener. I want to copy entire table (all data):
    private class NotEditableTable extends JTable
    NotEditableTable(Object[][] data, Object[] columnNames)
    super(data, columnNames);
    setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    setCellSelectionEnabled(true);
    getTableHeader().setReorderingAllowed(false);
    NotEditableTableEngine nete = new NotEditableTableEngine();
    this.addMouseListener(nete);
    public boolean isCellEditable(int row, int column)
    return false;
    private class NotEditableTableEngine extends MouseAdapter implements ActionListener
    public void mouseReleased(MouseEvent e)
    if (e.isPopupTrigger())
    JPopupMenu menu = new JPopupMenu();
    JMenuItem menuitem = new JMenuItem(Lang.TABLE_COPY, new ImageIcon("res/Copy16.gif"));
    menuitem.addActionListener(this);
    menu.add(menuitem);
    menu.show(NotEditableTable.this, e.getX(), e.getY());
    public void actionPerformed(ActionEvent e)
    TransferHandler th = new TransferHandler(null);
    NotEditableTable.this.setTransferHandler(th);
    Clipboard clip = NotEditableTable.this.getToolkit().getSystemClipboard();
    th.exportToClipboard(NotEditableTable.this, clip, TransferHandler.COPY);
    }

    I also tried the code above with a simple JTextField, both with text selected and not.Did my sample code use the TransferHandler??? The simple way to do it for a JTextField would be
    Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
    StringSelection testData = new StringSelection( textField.getText );
    //StringSelection testData = new StringSelection( textField.getSelectedText );
    c.setContents(testData, testData);
    As for the table I said that the Ctrl-C KeyStroke will invoke the default Action to copy selected data from the JTable to the Clipboard. This can be tested manually by simply using Ctrl-C. If you want to invoke it in your program then you need to get the corresponding Action from the JTable and invoke the ActionPerformed method of the Action. You can try using the
    getActionForKeyStroke(...) method of JComponent to get the Action.

  • HELP... Clipboard not working in CS6 on Mac

    DESPERATELY NEED HELP.
    Just upgraded to Creative Cloud CS6 Photoshop on my Xeon Mac Pro, 16 gigs ram, tons of disk space, Mac OS 10.7 and when I take a screenshot I can't import it to Photoshop.
    I get the message that it could not import the clipboard because the file is not a TIFF.
    WHAT? I have been using PS since it was in Beta and NEVER had this problem before. How do I fix it??
    I'm desperate... I have work to do but I can't do it without importing screenshots from the clipboard. Reverting to CS3 isn't an option because I've upgraded to OS 10.7 and it no longer works. UGH...
    Thanks to anyone who can help... or who can tell me how to get through directly to Adobe to get a fix.
    Carol

    It sounds like something is wrong in the application that put the data on the clipboard.
    It is writing something that is supposed to be TIFF, but contains problems.
    This is probably not something that Adobe can fix - since the Macintosh clipboard works for others, and Photoshop is just reporting an error in the data given to it by another application.

  • In iOS 7, my clipboard is not working properly.

    When I try to paste anything in an app or message it brings up a previously copied message, not my most recent "copy". What is going on?

    I have the same thing as well, since the beginning, my iPhone 5S brings back into the clipboard about the first thing I've ever copied on it (I think it was inside Safari, 23rd of September, the exotic word "muography"). Now, whenever I copy and paste something, everything is fine for a few minutes (sometimes even less), but after some time, when I paste the presumed clipboard content, this damned "muography" turns up instead, ever and ever again. No way out, no reboot helps, even not the upgrade from 7.0.1 to 7.0.2, did not yet try to restore and re-install from backup, as that takes half a day of trouble. I suspected 1Password for a while, which is able to "forget" clipboard content after a well-defined time, but whether 1Password is present or not, whether it is set to forget or not, nothing changes, "muography" comes back into the clipboard after some ten minutes at most.

  • CRASH "Not enough memory to create clipboard. This should never happen."

    CRASH Error message: "Not enough memory to create clipboard. This should never happen."
    What the F???
    SvK

    i was talking to someone at frankfurt about this (possibly logic had crashed on something we were looking at - i don't remember) and they said error messages like that were for the developers. the fact you saw the error message yourself was in itself a bug.
    i don't know for sure, but i think you are seeing some kind of bug relating to memory management. try deleting history and reorganizing memory if you get this error a lot.

  • PLEASE how can I copy someting to my clipboard and paste it to my homework paper??? I can't cut and past or copy/paste anything.

    Just please help. I'm feeling kinda silly.

    Hi Mommajj,
    Have you tried the keyboard shortcuts?
    * Copy: Ctrl+C
    * Paste: Ctrl+V
    You might also want to look at [http:// http://kb.mozillazine.org/Clipboard_not_working this article about the clipboard not working]. There may be some helpful information in there.
    Hopefully this helps!

Maybe you are looking for

  • How do I add just a portion of a song to iMovie?

    How do I add just a portion of a song to iMovie?

  • Windows OS on Nokia N8

    Hello does anybody know when or if gonna be  OS changed on N8?  that would be awesome  lets buried **bleep** symbian once for all !! Solved! Go to Solution.

  • Improvements for z1

    So recently the z2 and the tab z2 hav been released with impressiv enew features so the other just passed flagship z1 sud hav these features so through a software update the z1 sud b made able to capture 4k ultra hd videos like the z2 both feature th

  • How to maintain translation of views in material master

    Hi, How we can maintain translation of views in material master E.g. Basic Data Classification Purchasing MRP1 MRP2 Ect- We want to maintain translations in different languages. Thanks Sudhir

  • Toplink 10.1.3 Cache Synchronization

    Our application is hosted on a vertical and horizontal cluster. Server1 has 2 JVMs JVM1 and JVM2 Server2 has 2 JVMs JVM3 and JVM4 I have set cache coordination in a pre login Even Listener, the code to do it is - RemoteCommandManager rcm = new Remote