Cannot run command window

In Windows I would expect to call up a seperate command window with the following, but it appears to freeze up. What am I doing wrong?
import java.io.*;
public class command {    
  public static void main(String[]args) {
    try {
      Process runprogram = Runtime.getRuntime().exec("C:\\windows\\system32\\cmd.exe");
      try {
        runprogram.waitFor();
      catch(InterruptedException e){}
    catch(IOException e) {
      System.err.println("Cannot run command window");
}

What about this...
    Process proc = null;
    try
      proc = Runtime.getRuntime().exec("start cmd");
      proc.waitFor();
    catch(Exception e)
      e.printStackTrace();
    }Some dukies would be nice next time ;-)

Similar Messages

  • App cannot run on Windows Server 2012 R2

    I have an application that runs well on Windows Server 2012. The application has two editions 32-bit and 64-bit, both are from the same code base.
    However, on Windows Server 2102 R2, the x64 version of the application works, but the 32-bit version does not run. Invoking the 32-bit of the application generates the "This app cannot run on you PC" message.
    I tried the compatibility troubleshooting, and it does not help.
    Any suggestion on what could be the problem?
    Thanks.
    jwang

    <moved from Downloading, Installing, Setting Up to Photoshop General Discussion>

  • Forms cannot run at Windows Server 2003

    Windows Server 2003
    Forms 10.1.02
    Database 10g 10.2.0.1 Production
    every time i run the forms application but the firefox show it is crash...
    also my Windows Server 2003 cannot run any java application...
    need some advice from experts here
    THANKS
    dausnasir

    The kinda answer I like: download, copy, mesh, hack. Looks very nice, must work in most cases, but not this time for me. Behavior was exactly the same, running the nightly build.
    Just for the records:
    Safari prefs in my Windows live happy in:
    C:\Documents and Settings\Administrator\Application Data\Apple Computer\Safari
    C:\Documents and Settings\Administrator\Local Settings\Application Data\Apple Computer\Safari
    These days I installed an Safari in a brand new 2003 and worked nice. Bug 4 x 1 Safari. Bug still winning.
    So, it must be some stuff, some little tricky service or software I install in my usual Windows.
    Anyway, thank you very much...
    If someone have some clue, I'll apreciate

  • Word 2007 AddIn Cannot Run on Windows XP SP3 + Office 2007

    Hi All,
    I faced an issue regarding our Word 2007 AddIn cannot run on Office 2007 + WinXP SP3.
    I developed a Word 2007 AddIn using VS 2010. The addin works fine on Win7 + Office 2007. But It cannot run in Word 2007 in WinXP.
    I have tried the following testing.
    1. I rebuild a new WinXP environment + Office 2007 + VS 2010. No antivirus in my machine. I create the Word 2007 AddIn using VS 2010. But unfortunately, it cannot run in my WinXP machine. it's very strange.
    2. I rebuild a new Win7 environment + Office 2007 + VS 2010. No antivirus in my machine, and the same steps with previous. it runs fine.
    3. I noticed that, if I debug the Word AddIn Project using VS 2010 In XP, it cannot run into debug mode. I checked the Word Options
    I have highlight the test addins it always uncheck. If I checked it, when I reopen Word. it will change to uncheck status. 
    And the addins always in Inactive Application Addin group.
    @All guys, How to solve this issue? It's very very strange. 
    Thanks a lot for your help.
    Regards,

    Hello Ricky,
    First of all, I'd suggest checking the Trust Center settings in Outlook. Then take a look at the Disabled Items list. Is your add-in listed there?
    Microsoft Office applications can disable add-ins that behave unexpectedly. If an application does not load your add-in when you try to debug it, the application might have hard disabled or soft disabled your add-in.
    Hard disabling can occur when an add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event
    handler in your add-in is executing.
    Soft disabling can occur when an add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable an add-in if it throws an unhandled exception while the Startup event
    handler is executing.
    When you re-enable a soft-disabled add-in, the application immediately attempts to load the add-in. If the problem that initially caused the application to soft disable the add-in has not been fixed, the application will soft disable the add-in
    again.
    You can read more about that in the
    How to: Re-enable an Add-in That Has Been Disabled article in MSDN.

  • Safari 5 cannot run on windows XP pro

    I am a bit confused about this problem. Reading some topics I saw that solution for my problem could be to delete or move "safari" folder from C:\Documents and Settings\user name\Application Data\Apple Computer. But this doesn't work for me. Also I tried to create a new user account. Log of as me and log in as new user. Then safari runs normally. Then I log of and log back in as normal(usual) user and safari runs normally too, but when I delete just created user account and restart windows, safari is dead again. Further, when I log in as new user and try to start safari then, it wouldn't run. Then log of as new user and log in as usual user then starts normally. Is there a solution for constantly log in/out?
    Thanks in advance.

    I've tried it on Win XP SP3 and Win XP SP2 and it works fine.
    Have you tried installing it to a different folder?

  • Connecting to SCVMM remotely via install on workstation cannot run console windows to VMs (locally on scvmm it works)

    We recently installed a SCVMM 2012 machine and connected it to a few HyperV2012 hosts.
    From the SCVMM console locally on the machine it is installed on, I can connect to the Console of the VMs on the remote HyperV machines.  However for some reason when I run it remotely from my workstation, I can connect to SCVMM just fine, but connecting
    to the console of the VMs gives me the error:
    Virtual Machine Manager lost the connection to the virtual machine for one of the following reasons:
    Another connection was established to the console of this manchine.
    The virtual machine has been shut down or put into the saved state.
    The user credentials do not have the necessary privilege to connect.
    0x0003, 0x0000
    The firewall is not detecting any dropped packets (I enabled logging) and I am logging in with the same user as I do locally to the SCVMM server, so it is not permissions.
    Any advice would be extremely helpful.  Thanks,
    Nicholas

    I also find a matching Success Security Audit for trying (even though it doesnt work):
    An account was successfully logged on.
    Subject:
    Security ID:
    NULL SID
    Account Name:
    Account Domain:
    Logon ID:
    0x0
    Logon Type: 3
    Impersonation Level: Impersonation
    New Logon:
    Security ID:
    DOMAIN\MyNonDomainAccount
    Account Name:
    MyNonDomainAccount
    Account Domain:
    DOMAIN
    Logon ID:
    0x156DC3A5C
    Logon GUID:
    {bcdbadca-0910-a383-c130-2b86551f6d33}
    Process Information:
    Process ID:
    0x0
    Process Name:
    Network Information:
    Workstation Name:
    Source Network Address:
    Source Port:
    Detailed Authentication Information:
    Logon Process:
    Kerberos
    Authentication Package:
    Kerberos
    Transited Services:
    Package Name (NTLM only):
    Key Length:
    0

  • [SOLVED] udev rules: cannot run command

    I want to run a scipt everytime I plug in my external harddrive. I read the documentation and create a file called /etc/udev/rules.d/extern_hd.rules:
    SUBSYSTEMS=="usb", SYSFS{serial}=="33504D315647585A", SYMLINK+="ExternHD", RUN+="/root/scripts/test.sh"
    The symlink "ExternHD" gets created. The permissions of test.sh are rwxr-xr-x root root, but it never gets executed. What am I doing wrong?
    Last edited by Kei (2007-09-18 11:30:35)

    Solution was easy... Udev doesn't want to start anything from within /root, so I put a hardlink to /usr/local/bin/ and now everything works fine.

  • How do I install itunes on a windows 8 computer. I keep getting the message that the app cannot run on my computer.

    I cannot install itunes on my windows 8 computer. I get the message that the app cannot run on my computer.

    Hi mlheidt,
    If you are having trouble installing iTunes on your Windows 8 computer you may want to use the following article to help you get it up and running -
    Issues installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/HT1926
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • Please help!!! Cannot run Windows Update in Win 7 Pro after changing new hard-drive. (X201s)

    Hi everyone,
    I have been using my thinkpad x201s for more than one year by now. And recently I change a new and larger hard drive for my laptop. When I tried the thinkpad rescue and recovery disc on the new hard drive, everything works fine except that I cannot run Windows Updates after the installation was finished.  The recovery DVDs were burned directly from the original image stored in the computer when the first I received my laptop last year.
    Every time when I try to run the Windows Update, it shows the following: "Windows Update cannot currently check for updates, because the service is not running, you may need to restart your computer."
    I restarted my computer later but nothing changed. Can't run Windows Updates and can't even install IE9.
    I then moved back to my old hard drive and everything is normal, no problem with Windows Updates. I also tried to create a back-up image by running win 7 Backups and Restore. Later when I changed back to the new drive and followed the instructions to restore my system from the image I created earlier in a USB drive, it worked except that still the system can't run Windows Updates program.
    I'm now getting very confused and upset, is it something to do with the software copyright? It's been a week now and I tried to Google the similar problem but no solutions work here. All I want to do is moving my current system to the new hard drive so that I can continue to use my laptop but it just failed updating every time.
    Could anyone kindly tell me what to do when changing hard drive in order to avoid the problem I'm dealing with? Sorry I'm not a pro type user and just want my laptop to work appropriately.
    My warranty has already expired so I guess the Lenovo Technical Hotline wouldn't answer my questions anymore. Please help!! Much appreciated.
    Thanks so much in advance!!

    I'm not sure this is the issue, but from your description, it seems as though all you have to do is activate the windows update service. If I were you, I'd search for "Services" in the start menu, open it and look for "Windows Update". Check in its properties that it is set to "Automatic (Delayed)", if it isn't, set it, and start the service, you should then be able to check for updates, be careful though that none of your other programs aren't stopping the service, usually these programs are there to "optimize your performance" or "boost your system",...
    Hope this helps.

  • Execute Unix command from Java program running on windows

    Hello,
    I need to write a java program that fetches file count in a particular unix machine directory. But java program will be running on windows machine.
    The program should execute unix list command and fetch the output of that command.
    Can anyone help me on this?
    Thanks.

    Hi there,
    I had a similiar problem, though years ago. It was to have a java program execute any other. Lately, I've had to have a java program running on a unix machine execute a shell script. Entirely two different scenarios. I'm not sure what you will need for your app, but look into this:
    Java Native Interface for executing C/C++ code.
    C/C++ Code for launching the program you need to run.
    java.lang.Runtime(?).exec(....)
    With a combination of that stuff, you can make a launcher for any os that has Java running on it, and with Runtime, you can exec() pretty near any sort of unix shell or app command you'd like.
    Good luck.
    Tim

  • Windows XP i-Tunes wont open.Message comes up "i-Tunes cannot run because some of its required files are missing.Please reinstall i-Tunes. Tried reinstalling but quits midway thru installation

    I have Windows XP & until recently i-Tunes was working fine.Now when I try to open I get this message "i-Tunes cannot run because some of its required files are missing. Please reinstall i-Tunes. So I did. Midway thru ,installation stops & same message is repeated. So I uninstalled i-Tunes, Downloaded new one,went thru installation process for the same result & same message. Have tried procedure 4 times,resulting in same result each time. HELP!!!!!!!!!!!!!!!

    I did try to uninstall and reinstall.  It messed up my computer.  I had to "RESTORE" from the prior days backup.  This was not helpful at all.  I'm used to losing all my stuff when I connect to iTunes, that's a whole other issue, but now I'm completely banned from any updates to my phone at all.  Geeze.......

  • I cannot run anymore itunes on my laptop - error 7 (windows error 998)

    I cannot run anymore itunes on my laptop - error 7 (windows error 998)

    See Troubleshooting issues with iTunes for Windows updates.
    Use the steps in the second box to repair your iTunes installation. Your library should be unaffected by these steps but there is backup advice elsewhere in the user tip.
    tt2

  • Cannot RUN Illustrator CC in windows 8 (x64)

    I have install adobe illustrator before in my windows 8 (x64)
    it run well and no problem at all
    due to some reasons i uninstall all adobe softwares last 2 days
    and install back the illustrator too
    but currently it cannot run in my windows
    after the illustrator's  splash screen, the whole screen turning white and seems in running mode...
    yet the software didnt show up at all... but just freeze in the white screen
    other adobe series software work well in my windows.. just this illustrator
    please help... i really need to use illustrator for these days for my assignments

    Sign in, activation, or connection errors | CS5.5 and later
    Mylenium

  • Short cut to run SQL under SQL Commands window

    Hi people
    what is the keyboard key to run the sql statements under SQL Commands windows in APEX. like in PL/SQL Developer its F8.
    Thanks

    Thanks dccase
    It works
    Appreciate ur help

  • Server command window disappears after running

    Hi,
    I have been having major problems with BEA weblogic. I'm just trying to run samples
    from their book and I got things to work using version 6.1 which I downloaded
    from the site but when it came to Entity Beans, the sample wouldn't work. So I
    installed the 6.0 version from the CD and now the server itself doesn't run. When
    I Start the Server from the Start Menu, the command window pops up and then just
    disappears (at least for teh examples Server). The Default Server opens a command
    window, asks for my password (which it prints to the screen by the way...it's
    not supposed to do that) and then disappears. I don't know what to do!!
    Any suggestions is really truly absolutely appreciated!!
    Cindy

    Hi,
    See where that shortcut points and go to that directory to execute that start
    script from command prompt, then you can see the exact exception it will be
    throwing....
    may be wrong start-up password i guess...
    regards
    aseem
    Cindy wrote:
    Hi,
    I have been having major problems with BEA weblogic. I'm just trying to run samples
    from their book and I got things to work using version 6.1 which I downloaded
    from the site but when it came to Entity Beans, the sample wouldn't work. So I
    installed the 6.0 version from the CD and now the server itself doesn't run. When
    I Start the Server from the Start Menu, the command window pops up and then just
    disappears (at least for teh examples Server). The Default Server opens a command
    window, asks for my password (which it prints to the screen by the way...it's
    not supposed to do that) and then disappears. I don't know what to do!!
    Any suggestions is really truly absolutely appreciated!!
    Cindy

Maybe you are looking for

  • DHCP & self-assigned IP problem-Airport doesn't work

    I'm not really a technical type, but I'm pretty quick to pick things up and several weeks of trying to deal with this issue has made me pretty knowledgeable about things related to it specifically. Background: I have a month-old Macbook Pro that runs

  • Error in Installation Of EP

    Hi While i am trying to install EP the Error occurs as MOS-01017  Processing of adapt operation   Content of table: t_InQMy_ADAPTIONS_CHECK   Row[0]    OpMode="CHECKIFNOTSTRINGS" PatternDefinitions="%BOL%:Line:%EOL%" PatternDefinitionsSeparator="_AND

  • Iphoto pickle

    Help! I've had a unlucky history with emac, several bad crashes, and had to resinstall OS three times due to 'kernal panics' and other annoying issues which have cost me weeks' of work. Now after latest re-install, using 10.3, later updated to 10.39,

  • Select-options and ranges

    Hi all, Belated Happy Holi. Can u  explain me the difference between Select-options and ranges? When, where and how to use them ? I know the basic differences, but i need to know in deep . could u give me the informatin with a scenario please ? Thank

  • I forgot my answers of security questions when i select (send a mail to reset my security questions) the mail wont received to my mail box?

    i forgot my answers of security questions when i select (send a mail to reset my security questions) the mail wont received to my mail box?