Trying to run simple executable from Windows 2000

I have tried the following code, but it does not work.
try
String[] cmd = new String[3];
cmd[0] = "cmd.exe" ;
cmd[1] = "/C" ;
cmd[2] = "test.exe";
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(cmd);
However if I replace 'cmd' with ' "notepad" ' the notepad lauches properly.
No exceptions are thrown so appears to be functioning, but the command window never opens and prompts the user for input (function particular to test.exe)
I also get the same response when I replace 'cmd' with ' "cmd" ')
Any Help would be greatly appreciated
Greg

If you are trying to exec a process that does some amount of console intput/output then you need to drain the spawned process' output pipes: you need to create and start two threads that will do
process.getInputStream ();
and
process.getErrorStream ();and read from those continuously. Without that, the spawned process may block.
This is somewhat of a Java FAQ. Read
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
for more useful details.
Note that notepad.exe does not do any console I/O and that's why it seems to work better.
Vlad.

Similar Messages

  • Trying to run an .exe from within pdf

    I am trying to run an executable file from within a pdf.  I get the error "This file is set to be launched by this pdf file.  This is currently disallowed by your administrator."  Error box is labeled "acrobat.exe"
    Using:  Adobe Acrobat 9 pro
    Windows 7
    This has worked with previous versions of Acrobat, is it still possible to do?

    This is disallowed for security reasons.
    See the "attachment configuration" section at : http://learn.adobe.com/wiki/display/security/Application+Security+Library to change this behavior.

  • Error during migration from Windows 2000 to RH Linux AS 4

    Hello all,
    Am trying to perform a migration of a 11.5.10 instance from Windows 2000 to RH AS 4. Am following steps listed in the doc id 238276.1.
    Have completed all steps, but autoconfig completes with the following error:
    INSTANTIATE PHASE
    imtjserv.properties INSTE8
    Subsequently, when I try to start apache, it failes with status code 3. When I try to execute adapcctl with configtest as parameter, get the following error:
    Checking the Apache Web Server Dedicated HTTP Listener configuration file..
    Ouch! ap_mm_create (1048576, "/oracle/hrd/hrdora/iAS/Apache/Apache/logs/mm.29136") failed
    Error: MM: mm:core: failed to acquire shared memory segment (Invalid argument): OS: No such file or directory
    Checking the Apache Web Server Dedicated PLSQL Listener configuration file..
    Ouch! ap_mm_create(1048576, "/oracle/hrd/hrdora/iAS/Apache/Apache/logs/mm.29174") failed
    Error: MM: mm:core: failed to acquire shared memory segment (Invalid argument): OS: No such file or directory
    adapcctl.sh: exiting with status 8
    Have tried out various suggestions posted relating to modifying of parameters for semaphores. This has not helped. I have also restarted the system several times with no progress.
    Any pointers welcome!!
    Thanking in advance.
    Regards,
    Vijay

    Did you check this note?
    Note: 357487.1 - Cannot Start Up Apache with error: MM: mm:core: failed to acquire shared memory segment
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=357487.1

  • Problem Starting WLS 5.1 from windows 2000 program group

    Hi
    I couldn't able to start Weblogic server 5.1 from windows 2000 program
    group(start > Programs > Weblogic 5.10 > Weblogic Server). I can start WLS
    without any problem from the console . I've check every configuration and
    environment setting, the problem still come out. Whenever I start WLS from
    program group , a window dialog with error messages will come out , here's
    the error messages :
    wlserver.exe - Application Error
    The instruction at "0x04d5d0d6" referenced memory at
    "0x00000000". The memory could not be "written".
    Click on OK to terminate the program
    Click on CANCEL to debug the program
    Any suggestions/solution will be appreciated .
    Thanks
    Chew Leong
    [email protected]

    look for weblogic.system.password property in your weblogic.properties
    file and see what's in there.
    Shailesh Mungikar wrote:
    I am trying to install WLS 5.1 SP12 on my Windows 2000 machine.
    I have WLS 6.1 already installed my PC.
    When I try to install, at the very end when
    "System" password required
    dialog pops up, I get another dialog box saying
    WLPASS~1.exe Application Error
    The exception Floating point division by zero (0xc000008e) occured in
    the application at location 0x50147c14
    When I press OK, it kill the "System password" dialog.
    The installation seems to be complete.
    If I go ahead and try to start weblogic, I get Exceptio
    java.security.AccessControlException: access denied
    (java.lang.RuntimePermission createSecurityManager)
    Any solution/workaround?
    thanks,
    _shailesh

  • Migrating roaming profile from Windows 2000 TS to Windows 2008 R2 RDS

    We have one TS running on Windows 2000. There are over 200 TS users. We are planning to migrate it to Windows 2008 R2. What's the easy way to migrate the roaming profile? Base on this article
    Support guidelines for migrating
    roaming user profiles data to ...
    Generally, user profiles that you create for users in Windows 2000, ... Server  2003 roaming user profile on Windows Vista or on Windows Server
    2008. ...  These methods migrate the
    roaming profile data to the new Version 2 user profile  format ...
    support.microsoft.com
    support.microsoft.com/kb/947025
    There are two methods to migrate roaming profile. "Method 2: Use the Folder Redirection feature to share data between Version 1 and Version 2 user profiles" doesn't "migrate the desktop settings and preferences such as wallpaper because of
    the differences in the operating systems". That isn't for us.
    "Method 1: Use the User State Migration Tool to migrate profile data to the new format (Windows Vista Only)" is recommend that you the User State Migration Tool (USMT) to migrate profile data in the following scenarios:
    You do not use roaming user profiles or folder redirection.
    You want to enable a more full-featured migration of user profile data from Windows 2000-based or from Windows XP-based systems to Windows Vista-based systems.
    Note The User State Migraton Tool will not function on Windows Server 2008. 
    So the method 1 doesn't work. Any suggestions?
    Bob Lin, MCSE & CNE Networking, Internet, Routing, VPN Networking, Internet, Routing, VPN Troubleshooting on http://www.ChicagoTech.net How to Install and Configure Windows, VMware, Virtualization and Cisco on http://www.HowToNetworking.com

    Hi,
    Thanks for your comment.
    Please check following article might helpful in your case.
    Hey, Scripting Guy! How Can I Edit Terminal Server Profiles for Users in Active Directory?
    http://blogs.technet.com/b/heyscriptingguy/archive/2008/10/23/how-can-i-edit-terminal-server-profiles-for-users-in-active-directory.aspx
    Configure Terminal Server User Profile – PowerShell Script
    https://gallery.technet.microsoft.com/scriptcenter/d36bd6b8-91b4-482b-8f67-9016cf367dbe
    How to assign a home folder to a user
    http://support.microsoft.com/kb/816313
    Sample script from above article.
    NET USER tester /add /comment:"Example Account for User"
    /expires:never
    /homedir:\\zippy\%username%$
    /profilepath:\\zippy\profile
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support

  • Trying to run simple servlet - error

              I am the first time user of Beas Weblogic & I am trying to run simple example
              servlets from Weblogic Console. However, when I try to LoadServlets, I get an
              error 'Property Change Error for Property "Load"; Unable to load servlet'
              Is there anything I am missing? I'd appreciate any help.
              Thx.
              Ravi
              

    Hi,
    I have found out the cause. im pointing to the wrong classpath. it should be class12.zip instead of class111.zip, something i copied from my server running oracle8i.

  • Exception CX_RS_ERROR occurred when trying to run the DTP from Cube

    Hi everyone,
    I've run the DTP &  loaded the cube using normal transformation routines , it works fine in the Dev Sys but not in quality & production. I've access only to the Dev sys. In Qual & Prod when trying to run the DTP from Cube to open HUB
    we're getting the following error
    Exception CX_RS_ERROR occurred (program: CL_RSTRAN_TRFN================CP, include: CL_RSTRAN_TRFN================CM024*
    My system support package level is SAPKW70106.
    I've found note 920338 but is for SAPKW70107.

    Hi,
    The issue seems to be with the one of the routines in the transformation and similar kind of the issues were solved by retransporting the DTP & the related transformation.
    Kindly reactivate the DTP and transformation in the source and execute a new request to transport the DTP, transformation and related routines to Quality & Production again.
    Hope this helps.
    Rgds,
    Colum

  • Moving oracle 9i database from windows 2000 to windows 2003 server

    hi everybody,
    plz provide me a solution how to move oracle 9i database from windows 2000 server to windows 2003 server with step by step and also with commands plz as i am very new to oracle
    thanks in advance
    suresh

    Install 9i on windows 2003 server and patch to the same level as the Oracle on Windows 2k
    Shutdown and make a cold backup of your old database. That includes datafiles, controlfiles, redo files, init file (spfile)
    Copy and put these files to the exact same directory structure/location, for example if old file is under D:\oradata\mysid\ then the file on new file should be under same directory. (If you are using Network Storage that make things easier, just mapping to the same drive letter.)
    Also make sure archive log dest and all dump dest directories are created. You don't have to copy all old logs and dump files over.
    Use oradim to create a new service for the database instance
    http://www.psoug.org/reference/oradim.html
    Set proper ORACLE_HOME, ORACLE_SID envionment varibles
    Run netca to configure listener, actually copy listener.ora and tnsnames.ora to $ORACLE_HOME\network\admin will do
    Try to start the database

  • Running My Program From Windows?

    Hi, now that I'm done with my program, is there any way that I can run the program from windows by creating a shortcut? I would like the program to run on other machines without having to start or install the JDK.

    Hi, now that I'm done with my program, is there any
    way that I can run the program from windows by
    creating a shortcut? I would like the program to run
    on other machines without having to start or install
    the JDK.First, the other machines do not need the JDK - they need the JRE which is much smaller. Second, your question is a variant of the most asked question on this forum. Try searching for "exe" or "executable" or something similar and you will find lots of answers.
    Quickly I can tell you that if your program use any GUI (ie AWT/Swing), there is no way you can avoid having the JRE on the target machines. You can, however, make installation programs that install the JRE along with you program if you wish.

  • HT201177 i'm trying to run a DVD from my mac book pro to a projector.  I can't get a picture and am using the AV cables for mac.  Ideas?

    I'm trying to run a DVD from my macbook pro to a projector.  I am using apple AV connectors and still get no picture.  Ideas?

    What are you getting on the projector?  Does it say 'no input detected'?  Are you getting the spiral galaxy wallpaper?

  • How to run an executable from command-line

    I'm learning how to use the Terminal and I got stuck in a silly thing (I suppose it is). How can I run an executable file from command-line in Terminal?
    For example: I have a file named "Hello" in the folder /sample. If I use the ls command (ls sample), I can see the file Hello. Then I move to the directory (cd /sample) and try to run the file Hello (typing "Hello") but I got "command not found" message.
    If I drag the Hello file from Finder to Terminal and hit Return, it runs perfectly. And if I type the full path to the file (even if I'm already inside its directory), it also runs.
    So, my doubt is if there is any command to run an executable from command-line.
    Thanks

    KJK555 wrote:
    Hi VK:
    Can you enlighten me on why it's neccessary to do the "./" thingy in OS X when in unix/linux
    I never had to resort to doing that?
    Kj
    I took the trouble of reading *man bash* and it explains the issue. to add the current directory to PATH you need to add an empty path to PATH like this
    PATH=$PATH::
    you can add it to ~/.bash_profile so that it's executed automatically when you start bash. I suspect the linux system you are talking about had this set up by default or had it added to PATH in /etc/profile which defines PATH globally.

  • I am trying to transfer my music from Windows to Macbook Air..help!

    I am trying to transfer my music from Windows to Macbook Air, & can't get it to work. I followed the tutorial, and the new itunes will not acknowledge the transferred music. Any pointers?

    When you sync, are you in the Sync Music tab?
    This article may help http://support.apple.com/kb/HT1386

  • Error when trying to run web report from BEx analyzer

    Hi Gurus,
    I am getting this error "STOP: System error in program SAPLRRS2 and form SELOPT_ASSIGN-01", when I am trying to run the report from the 4th button "Display report on Web" on BEx Analyzer. Can anybody tell me what this and how we can resolve it.
    Thanks and I will assign points.

    I coudn't properly understand solution provided herein:
    "Solution
    Note that you must generate the query again after you have implemented the correction (Transaction RSRT1 > Generate report).
    SAP NetWeaver 2004s BI
               Import Support Package 07 for SAP NetWeaver 2004s BI (BI Patch 07 or SAPKW70007) into your BI system. The Support Package is available when Note 0872279 "SAPBINews BI 7.0 Support Package 07", which describes this Support Package in more detail, is released for customers.
    In urgent cases, you can use the correction instructions.
    To provide advance information, the note mentioned above may be available before the Support Package is released. In this case, the short text of the note still contains the words "Preliminary version"."

  • Would like to upgrade to Dragon Naturally Speaking 11 from DNS 6 (which would also entail a necessary upgrade from Windows 2000 to 7) but understand after all this expense and trouble, DNS upgrade may not be compatible with Firefox 6?

    Question
    Would like to upgrade to Dragon Naturally Speaking 11 from DNS 6 (which would also entail a necessary upgrade from Windows 2000 to 7) but understand after all this expense and trouble, DNS upgrade may not be compatible with Firefox 6?
    Main priority is voice activation upgrade. Ideas about how to proceed appreciated!

    AFAIK, it's been over three years since a WinXP laptop or desktop PC has been sold; I specifically bought a laptop in June 2008 because it was being clearanced by that retail chain to meet Microsoft's deadline, and got it real cheap. It was tagged for the store manager to purchase, but he let me have it because I exceeded his expectations for the services I performed for his store and thought I deserved it. Anything that wasn't made for Vista-compatibility will be very iffy with Win7, IMO - so that basically rules out anything that was made before like Oct or Nov 2007.
    Unless another DNS 11 user happens to see this thread and can verify whether it works in Firefox 6.0 or not, I don't what to recommend except for you doing a web search to see what other DNS / Firefox users have to say about compatibility.

  • Migration of Oracle Database 8i from Windows 2000 to Windows XP

    Hi experts,
    I have to migrate Oracle 8i database from windows 2000 platform to windows XP platform.
    What are the steps that I need to follow in order to migrate.
    Please help me out..
    Waiting for your response.
    Regards,
    Imtiyaz

    Hi;
    Please see below note which could be helpful for you:
    Different Upgrade Methods For Upgrading Your Database [ID 419550.1]
    Minimizing Downtime During Production Upgrade [ID 478308.1]
    Master Note For Oracle Database Upgrades and Migrations [ID 1152016.1]
    Oracle Database on Unix AIX,HP-UX,Linux,Mac OS X,Solaris,Tru64 Unix Operating Systems Installation and Configuration Requirements Quick Reference (8.0.5 to 11.2) [ID 169706.1]
    Please check my blog
    http://heliosguneserol.wordpress.com/2010/06/17/move-to-oracle-database-11g-release-2-wiht-mike-dietrich/
    In this pdf you can see patch of to upgrade db from x to n wiht many senerios wiht all related metalinks notes which is created by Oracle worker Mike Dietrich
    Regard
    Helios

Maybe you are looking for