Send commands to the OS

is it possible to make simple java console application which can send commands to the os? for example in linux, if I want to remove a file through my application, can I send the "rm" command somehow?
thanx a lot

However if you just want to remove a file, you might find the delete() method of java.io.File more convenient than wrestling with all the pitfalls of Runtime.exec().

Similar Messages

  • New Win7 install. Can't open html files. Get "there was a problem sending command to the program".

    When I try to open an html file on my hard drive, I get a "There was a problem sending the command to the program" error. There is no way I can open a local html file with firefox, even though Win7 sees it these files as Firefox documents. This is a brand-new Gateway tower running Windows7-64, Athlon phenom 4x processor, 6G RAM, and the latest version of Firefox (a week old).

    Try:
    *http://kb.mozillazine.org/Windows_error_opening_Internet_shortcut_or_local_HTML_file_-_Firefox
    You can try to redo the default browser (temporarily make another browser the default).
    *http://kb.mozillazine.org/Default_browser

  • Can't open Excel files saved to desktop, get popup "There was a problem sending command to the program".

    Whenever I save an MS Excel file to my desktop, it creates an icon on the screen. But when I try to open it, I get a popup that says "There was a problem sending the command to the program."
    This happens with all Excel files - but MS Word and other files work fine.
    Thanks for your help.

    Yes, I saw that earlier but it seems to be a temporary fix. I had the same issue return 2 weeks ago, then again yesterday. Each time, I've tried this solution which works but only to see it return at some time in the near future.
    Coincidently, I have a similar issue occur on my iPhone 4S w/ iOS 6. There, my keyboard shortcuts won't work in forms unless I tick off Data and Documents iCloud setting, power down the phone, then turn it back on. But like this, it only seems to work for a temporary time and the problem resurfaces in a few days.

  • How to send command to the control board?

    Hello everyone
       I am developing pci-7344`s driver under RTX.It says in the DDK that
    command and data passed to or from the controller is handled in a
    packet format. A packet consists of resourceID,commandID,data etc.Now I
    know the information of resourceID,commandID,data etc.DDK or the
    hardware user manual does not mention how to send them in a packet.
      Moreover The command buffer register is 16-bit.
      I try to send them one by one but it indicates "modal error" in the
    csr.Since I have not programmed "error-handling" part of the driver ,so
    I do not know what the error codes are.
    Hope some advice on how to send the command packet? It is best if there
    is an example !!
    Thank you!!!

    Sandy,
    Here is a modified version of the example I suggested. It includes the  option of using the parallel port for communication. I am in the process of getting some example ZPL for you for the label formats that you are using.This example should give you everything you need to communicate with the printer.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    Basic Serial Write and Read (8.6).vi ‏24 KB

  • After updating I can no longer click on link in emails to open a web page the error produced is "There was an eror sending command to the program"

    IF someone sends me an email witha clickable link in it e.g a verification email when I click the link all I get is the above error, any ideas guys??

    Try:
    *http://kb.mozillazine.org/Windows_error_opening_Internet_shortcut_or_local_HTML_file_-_Firefox
    You can try to redo the default browser (temporarily make another browser the default).
    *http://kb.mozillazine.org/Default_browser

  • Re: using SEND command in script

    Here is part of my login script.
    Thanks,
    Larry
    IF "%LOGIN_NAME" = "SHIP2" THEN BEGIN
    #Capture q=SHIPq NFF NB ti=10 nt l=1
    END
    SEND /A=N
    EXIT
    rem IF "%OS_VERSION" = "V7.00" THEN BEGIN
    rem #capture /Endcap
    rem END
    rem IF "%OS_VERSION" = "V7.00" THEN BEGIN
    REM EXIT
    END
    IF MEMBER OF "ACCOUNTG" THEN BEGIN
    rem MAP INS S1:=C:\PVSW\BIN
    END
    MAP INS S2:=c:\windows
    MAP INS S3:=c:\windows\command
    EXIT ""
    END
    "Edison Ortiz" <[email protected]> wrote in message
    news:[email protected]..
    >
    > Can you post your login script ?
    > It could be an error with the syntax.
    >
    > --
    > Edison Ortiz
    > Novell Support Connection SysOp
    > (No Email Support, Thanks !)

    The line "@ SEND /A=N" shouldn't serve any function.
    SEND "Message" [TO] <user|group|server> [/B] [/A=N]
    /B bindery mode (allows some additional options)
    /A=N exclude yourself from the broadcast
    SEND.exe stems from NetWare 1.x/2.x/3.x/4.x and has been replaced by the
    Client32 broadcast functionality.
    There are a couple of 3rd party replacements from the command line.
    Wolfgang
    "DareG" <[email protected]> wrote in message
    news:[email protected]..
    >
    > I was wondering I can find information on the "SEND" command and the
    > Switches? I have tried just about everywhere I can think of. It's not
    > in the 6.5 Book I have either. The reason I ask is because we have it
    > in our login script but no one seems to give a definitive answer to what
    > it does.
    >
    > the line is "@ SEND /A=N" Yes, I know what the "@" is for! :)
    >
    >
    > --
    > DareG
    > ------------------------------------------------------------------------
    > DareG's Profile: http://forums.novell.com/member.php?userid=68413
    > View this thread: http://forums.novell.com/showthread.php?t=177935
    >

  • How to send command to device via HTTP

    Hy everyone,
    i have installed olite on a number of wince device.
    If i try to send command to the device when connected with the desktop computer on wich the mobile server is installed everything goes well.
    My devices are connected by wifi to the lan of my company and i would like to send command via HTTP.
    I tried to change the settings on the mobile server setting the Network Protocol to HTTP and setting the ip of the device but it does not work.
    Does anyone know how to solve the problem?
    David.

    Hi Ravi,
    yes the command is queued but anything happens.
    I tried to wait for long time but the command never succeed to execute.
    If i try to send again the command from the Command History windows the command fails.
    David.

  • Unable to send command to smart card reader

    i am writing code for reading/writing to a smart card through a smart card reader which support RS232 serial communication.
    Problem is that the reader is not responding to the commands i send to it.
    My Smart CArd reader (HID 6055 Mifare Smart CArd reader) sends some ack when it is switched on. That data i am able to receive though the following code.
    So i think i am unable to write (send command ) to the reader.
    Also how do i debug my code to see whether the command is actually being sent or not. I tried hyper terminal but if i use hyper terminal then the java prog is not able to open an OtputStream for writing to the smart card.
    I appreciate your kind help...
    My prog is
    *The
    import javax.comm.*;
    import java.io.*;
    import java.util.Enumeration;
    import java.util.TooManyListenersException;
    public class SmartCard
         public static void main(String args[])
              CardReader cs=new CardReader();
              cs.setConnectionParameters();
              if(cs.scanForCard())
                   System.out.println("Successfully sent Scan command to the reader");
    class CardReader implements SerialPortEventListener //,CommPortOwnershipListener
         CommPortIdentifier portId;
         Enumeration portList;
         InputStream inputStream;
         OutputStream outputStream;
         SerialPort serialPort;
         String outputString="";
         String inputSting="";
         public CardReader()
              portList = CommPortIdentifier.getPortIdentifiers();
               while (portList.hasMoreElements())
                portId = (CommPortIdentifier) portList.nextElement();
                if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL)
                     if (portId.getName().equals("COM1"))
                             System.out.println("Port Found");
                             break;
         public void setConnectionParameters()
              System.out.println("Setting Parameters for "+portId.getName());
              try
                serialPort = (SerialPort) portId.open("SimpleReadApp", 2000);
            catch (PortInUseException e)
                 System.out.println("PortInUseException in CardReader.setConnectionParameters :"+e);
             try
                  serialPort.addEventListener(this);
              catch (TooManyListenersException e)
                   System.out.println("Error in adding EventListener to serial Port: "+e);
            try
                inputStream = serialPort.getInputStream();
            catch (IOException e)
                 System.out.println("IoException in CardReader.setConnectionParameters while setting inputStream :"+e);
            try
                outputStream = serialPort.getOutputStream();
            catch (IOException e)
                 System.out.println("IoException in CardReader.setConnectionParameters while setting outputStream :"+e);
              serialPort.notifyOnDataAvailable(true); //We will check for
              try
                serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE);
            catch (UnsupportedCommOperationException e)
                 System.out.println("Exception in setting the Baud Rate: "+e);
         public boolean scanForCard()
              boolean result=false;
              outputString="AA521D26000A";//Command for Scanning a Card
              // outputString="AA4C280810201C";
              // byte[] cmd=new byte[]{'A','A','5','2','1','D','2','6','0','0','0','A'};
              byte[] cmd=new byte[]{'8','0','4','C','2','8','0','8','1','0','2','0','1','C'};
              try
                 //outputStream.write(outputString.getBytes());
                 outputStream.write(cmd);
                 result=true;
            catch (IOException e)
                 System.out.println("Error in writing scan command to smart card: "+ e);
                 result=false;
              return result;
         public void serialEvent(SerialPortEvent event)
              System.out.println("\nSome Event Occured");
              switch(event.getEventType())
                 case SerialPortEvent.BI: System.out.println("event no 1");
                 case SerialPortEvent.OE: System.out.println("event no 2");
                 case SerialPortEvent.FE: System.out.println("event no 3");
                 case SerialPortEvent.PE: System.out.println("event no 4");
                 case SerialPortEvent.CD: System.out.println("event no 5");
                 case SerialPortEvent.CTS: System.out.println("event no 6");
                 case SerialPortEvent.DSR: System.out.println("event no 7");
                 case SerialPortEvent.RI: System.out.println("event no 8");
                 case SerialPortEvent.OUTPUT_BUFFER_EMPTY: {System.out.println("event no 9");
                      break;}
                 case SerialPortEvent.DATA_AVAILABLE:{System.out.println("event no 10");
                      readDataFromReader();}
                      break;
         public void readDataFromReader()
              System.out.print("Some data Sent by the Smart Card");
              byte[] readBuffer = new byte[20];
            try
                 while (inputStream.available() > 0)
                     int numBytes = inputStream.read(readBuffer);
             System.out.print(new String(readBuffer));
             catch (IOException e)
                  System.out.println("Some Error Occured in reading the data sent by Reader: "+e);

    hi all..
    Im new to this technology and wanna learn and try to program some simple applications using Smart Card...
    Reading thru all the topics above, Im wonderring is the Card Reader able write codes to the Smart Card, or maybe jux simply able to update the info inside the card??
    I also heard about Card Decoder as well, I mean if the Card Reader can do the task.. why do we need Card Decoder ?!
    Sorry if I stated something wrong... Im new and hope that someone could share some valuable knowledges here...
    Thanks much much !!

  • Possible to start or send commands to an app from a dock button

    Hi,
    I was looking into the MFi-program, but before that I was interested in if it is theoretically possible to do this:
    Start an ipad-app initiated from a dock-button (e.g. Skype) and then send commands to the app depending on other input from the dock? All over Apple Accessory Protocol.
    Best regards
    /Magnus

    Hi vernel,
    Welcome to the Support Communities!
    First, I recommend restarting your phone and then resetting if it's still not working:
    Restarting your device
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider.
    Press and hold the Sleep/Wake button until the Apple logo appears.
    Note: Reset your device only if you are unable to restart it.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    Below are the full articles:
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    If you can access your home screen, I also recommend verifying that cookies are not blocked and private browsing is turned off in Settings>Safari:
    iPhone User Guide - Safari settings
    http://help.apple.com/iphone/7/#/iph3d7aa74dc
    Cheers,
    - Judy

  • How do I send commands to my oscilloscope in NIMAX?

    Hello all,
    I am new to LabView and have purchased a digital oscilloscope & a digital signal generator. 
    I have the Remote command list for each of them. 
    The oscilloscope is USB, and the signal generator only has an RS232 port. 
    I am able to send commands to the oscilloscope through the EasyScope software that came with the scope, such as *CAL?, which successfully calibrates my scope.
    However, I cannot get my scope to respond in NIMAX.   Nor am I able to get the Signal Generator to work in either NIMAX or EasyScope.  
    Could someone tell me what I need to do to activate my USB channel in NIMAX, and also my RS232 channel?  
    Solved!
    Go to Solution.

    These are cheaper devices from ATTEN.   They also go under the name Siglent.   I have an ADS1102CAL+ scope, and a ATF20D+PA signal generator.  
    I am running 64bit Windows 8.    I am able to get both the scope & COM1 serial port to show up in NIMax and they look good in Device manager. 
    The Serial cable is a USB to RS232 adapter, since my PC has no serial ports.
    The test panel returns a string for the scope serial number using *IDN?, but none of the other commands work. 
    Here are 3 screenshots.  3rd shot is 2 commands (*IDN? & *CAL? for the USB Scope.  )
    I have not been able to get the USB drivers to work or install from their website.
    Attachments:
    NIMax shot 1.jpg ‏139 KB
    NIMax shot 2.jpg ‏107 KB
    NIMAX shot 3.jpg ‏97 KB

  • GPIB 488.2 Send command

    Why is it that when I use the GPIB 488.2 Send command, using the string "ID", it sends the string over and over again? I just want it to send the string once.

    The Send command should only send the string once. Could you possibly attach an NI-Spy log or a GPIB Analyzer capture to show us the problem?

  • When i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program

    when i click on an excel or word file in 2007 the program begins to open but then an error message says There was a problem sending the command to the program.
    i am using office2007  with windows7 premium home edition.  i have checked file associations., all DDE settings. i have even tried this in safe mode. the same thing happens. please note once i see the error. i can then go back to the file click on
    it a second time and it WILL open. AND i can open any file if i open excel and and find the file from there. i uninstalled and re-installed office 2007 from scratch. And i checked the compatibility mode (all un-checked) still the problem persisits. this is
    a real PITA.   anyone have any solution for this? Thanks 
    ken yanow

    Hi,
    Have you try to un-select the Ignore other applications that use Dynamic Data Exchange (DDE) setting?
    Click the Microsoft Office Button, and then click Excel Options.
    Click Advanced, and then click to clear the Ignore other applications that use Dynamic Data Exchange (DDE)
    check box in the General area.
    Click OK.
    If the problem cannot resolve, the Run as administrator may selected.
    Go to Office default install location: C:\Program Files\Microsoft Office\Office12.
    Right-click EXCEL.EXE > Properties >
    Compatibility tab.
    Under Privilege Level, uncheck Run this program as an administrator
    check box.
    Best regards.
    William Zhou
    TechNet Community Support

  • After updating to Firefox 3.6.9, when I click on a link in Outlook email, I get a message which says "General failure. The URL was: .... An error occurred in sending the command to the applicatio." and the link will not open. How can I fix this?

    I updated Firefox yesterday to 3.6.9. When I receive a URL link in an email within Outlook, I cannot open the link in Firefox. As I said in the question, when I click on the link, a Microsoft Office Outlook error message appears which states that a General failure has occurred in sending the command to the application (which is Firefox). I am using Office 2007 This did not occur prior to the upgrade of Firefox.

    See this lnk for a fix, it worked for me!
    http://www.pcworld.com/article/200103/fix_outlook_general_failure_error_for_email_links.html

  • Since switching to Firefox this week, when I click on a hyperlink in an e-mail in Outlook, I get this message, "General failure. An error occurred in sending the command to the application." It doesn't open a new window or do anything.

    Since switching to Firefox this week, when I click on a hyperlink in an e-mail in Outlook, I get this message, "General failure. An error occurred in sending the command to the application." It doesn't open a new window or do anything. Any work around to fix this?

    See this lnk for a fix, it worked for me!
    http://www.pcworld.com/article/200103/fix_outlook_general_failure_error_for_email_links.html

  • Excel won't open and error message There was a problem sending the command to the programe

    Hi there
    I'd be grateful for your help.
    I've just bought a new laptop and installed Office 2013.  I used Excel 2013, did what I needed to do and saved it.  This was 5 days ago.
    Today, I've tried opening the file from my desktop and get the error message 'There was a problem sending the command to the program'.
    And when I try to open Excel to do the DDE fix, which seems to be the best suggestion, I can't open Excel at all.  I've tried to get into it from the Apps screen.
    Any help would be gratefully appreciated.
    Thanks

    Don't seem like this can be fixed so I went back to version 6.0.2 which works good.
    I have Chrome now as my default browser and will not use fire fox until they fix it!
    Chrome works great!

Maybe you are looking for

  • Multiple iMac display failures

    Hi there, my late 2009 27" iMac has had two display failures since I purchased it.  The most recent replacement was done by Apple in Nov 2012 while still under Apple Care.  It is currently in need of a third display (the replacement one has failed af

  • Call of Duty 4 Help!

    HELP I bought the mac version of COD, i install it correctly without any problem, but when i run it, it doesn't work! It just quits by itself with no apparent reason!

  • TYPE casting with SQL Server 2005

    Hi, I recently migrated to SQL Server 2005 database from Oracle 10g. I used the %TYPE operator in Oracle to cast to the appropriate column data type. PROCEDURE INS_USER                i_USERNAME               IN USERS.USERNAME%TYPE,                i_

  • SCCM 2012 Client Communication

    Hellooo,  Migrated my clients to SCCM 2012 but still reporting to SCCM 2007 Server only .  Why so ? Note : MY SCCM 2007 Server still active mode only . Am sure  Best Regard's Krishna

  • Cannot open Photoshop documents FreeHand?

    Just reinstalled Leopard. I can no longer open Photoshop (PS) Documents with Freehand 10 or MX Freehand. All I get is a black box or a string of incoherent colors etc. I use Freehand for creating objects which is harder to do in PS. Likewise I export