Executing a .exe file brings up the DOS console

Hello,
My Java app calls a native program to run. I made an executable JAR file so users can just double-click on it to start the app. It all looks very nice except that, when my app calls the
native program, a DOS console pops up on the screen. It closes itself when the process is
finished but I'm wondering if there's a way to suppress the DOS console from popping up so
that DOS consoles won't keep flashing on the screen while the app is running.
The code I use to call the native program is as follows:
Runtime rt = Runtime.getRuntime();
Process child = rt.exec("someProg.exe");
Thanks in advance for any help.

First of all, thank you very much for your reply. I have checked the command associated with JAR files in my Windows system, it is already running it with javaw but random DOS consoles still flash all over the screen... Any other ways to work around this problem? Thanks.

Similar Messages

  • How to execute a .exe file in java(Jsp) without using a process ???

    Hi All ,
    How to execute a .exe file in Jsp without using a process ??? ...
    Is it Possiable ????

    itsdhanasaraa wrote:
    But as this a web application ... By using Runtime i'm getting some probs ..
    Let me guess, you want your web application to run a program on the client and to your surprise that's not working?
    Ain't gonna happen.
    its taking more time to execute .... that's y is there any other option to execute .exe file other than Runtime.getRuntime().exec("filename");Write proper English and you may be taken more seriously.
    1) it's not "taking more time to execute", whatever that's supposed to mean.
    2) there's no other way to execute something. Not that you should every use even that way anyway
    3) whenever you start thinking of executing external programs from Java, start thinking of not using Java in the first place.

  • I have a problem with running an EXE file on win2000, the Lab View is 5.1 and I do not know if it is 16 bit...

    I have a problem with running an EXE file on win2000, the Lab View is 5.1 and I do not know if it is 16 bit...what should I do?

    Hi Arika,
    The drivers that you need to install to make your executable work depends on what your executable is doing. To get started, you need to have the LabVIEW Run-Time Engine installed on your target machine (the Win2000 machine you are planning to use) in order to run your executable. Next, you need to determine what drivers your executable uses, if any. For example, if you are using GPIB instrument control, you will need to install the NI-488 drivers on your target machine. If you are performing data acquisition, you will need to install NI-DAQ drivers. If you are doing image acquistion, you will need to install NI-IMAQ drivers.
    All these drivers are available for downloading on ni.com. To get the drivers, go to ht
    tp://www.ni.com/support , click on the link that takes you to Drivers and Updates (under Option 3), and click on the links to get to the driver(s) you need. For example, if you need the LabVIEW 5.1.1 Run-Time engine, click on the All Drivers and Updates by Application link on the main page (http://www.ni.com/softlib.nsf/). Then click on the LabVIEW link, Windows 2000, Run Time Engine, and then you will see the link to get to the page to download the LabVIEW 5.1.1 Run-Time Engine.
    I hope this information helps.
    Best Regards,
    Wilbur Shen
    National Instruments

  • Through Java code I want to execute a exe file which is in aJar file

    I am having some classes and an exe file in a directory. I have made them in to a Jar file. In a class file which is in that jar file i want to execute a Exe file which is also resides in that jar file. Is it possible to exexute that EXE file?
    For Example....
    1. Im having a directory named CLIENT.
    2. In that directory I have 10 clss files and an EXE file.
    3. These class files and EXE files are ziped in to a Jar file.
    4. I have to give the Jar file to my client.
    5. He can put that Jar file where ever he installed my product may be C driver or D drive like that
    Now the problem is...
    I want to execute the Exe File from one of the class where both the exe file and class file resides in the Jar file
    This is my requirment
    Can anyone Help to me to solve this problem?
    Thanks in Advancd
    Ibram Shah.A.M
    ([email protected])

    The answer is to extract the EXE into a temp directory, execute it, and delete it when you're done. For example:
    //This is the path *inside* the JAR file!
    InputStream in = getClass().getResourceAsStream("/resources/myprog.exe");
    OutputStream out = new FileOutputStream("myprog.exe");
    File file = new File("myprog.exe");
    int data;
    while((data = in.read()) >= 0) out.write(data);
    in.close();
    out.close();
    //Execute the EXE here using java.lang.Runtime.exec()
    if(file.exists()) file.delete();
    ...

  • How to execute one .exe file with as3 in air ?

    Hi
    How to execute one .exe file with as3 in air?
    I want do this work without fscommand .
    plize help me .

    itsdhanasaraa wrote:
    But as this a web application ... By using Runtime i'm getting some probs ..
    Let me guess, you want your web application to run a program on the client and to your surprise that's not working?
    Ain't gonna happen.
    its taking more time to execute .... that's y is there any other option to execute .exe file other than Runtime.getRuntime().exec("filename");Write proper English and you may be taken more seriously.
    1) it's not "taking more time to execute", whatever that's supposed to mean.
    2) there's no other way to execute something. Not that you should every use even that way anyway
    3) whenever you start thinking of executing external programs from Java, start thinking of not using Java in the first place.

  • How to execute a exe file using javascript on app window.load.

    How to execute a exe file using javascript on app window.load.

    Hi sb00349044,
    As I have already mentioned in multiple replies to your previous questions, the SUMO forums focuses on providing help to end users with usage-questions and issues.
    For developer-related questions, please refer to one of the many resources readily available that I have linked to in the past:
    * [https://developer.mozilla.org/en-US/Firefox_OS MDN]
    * [http://stackoverflow.com/questions/tagged/firefox-os StackOverflow]
    * [https://lists.mozilla.org/listinfo Mozilla Mailing Lists]
    - Ralph

  • Can AIR execute Windows .EXE files?

    Can AIR execute Windows .EXE files?

    hi
    you can now implement a standard windows installer (ie a native installer, rather than the AIR installer) when users install your AIR app. Not sure if there's an option to do this in flex/flash builder but it can be done via command line.
    eg:
    adt -package -storetype pkcs12 -keystore myCert.p12 -target native NativeProcessTest.exe NativeProcessTest-app.xml NativeProcessTest.swf NativeApps/Windows/bin/echoTestWindows icons
    or try this handy packager:
    http://www.webkitchen.be/package-assistant-pro/

  • Execute another exe file by my VI

    Hello,
    I am trying to execute anothe exe file, which was not created using LabView, from my VI.
    Is it possible? How could I do it?
    Thank you

    Use the System Exec function. Under Connectivity -> Libraries & Executables palette.

  • Hi- I'm trying to install xcode 2.5. Idon't know what to do w/.exe file downloaded from the apple developer website

    Hi- I'm trying to install xcode 2.5. Idon't know what to do w/.exe file downloaded from the apple developer website.
    I would like to be able to use AU Lab but my developer folder only has extras/palettes inside- no applications or tools.
    Thanks

    Hello,
    What is the full name of this exe file?
    Those are for Windows®

  • Error in downloading itunes, all the .exe files turn into the itunes icon. I had to removed itunes.

    Error in downloading itunes in windows, all the .exe files turn into the itunes icon

    Download the lnk registry fix from www.sevenforums.com/tutorials/19449-default-file-type-associations-restore.html. Reinstall iTunes. Should you find that all of your desktop shortcuts have again turned into links to the iTunes application apply the patch.
    For further advice see Troubleshooting issues with iTunes for Windows updates.
    tt2

  • Psexec shows Access denied when i execute a .exe file on a remote machine

    Hi All,
    I am using Psexec application to run exe on multiple remote machines in the domain. When i run the the .EXE i get the error message saying access is denied.
    I am running this script against agents in a list.
    Below is the script i am running in the batch:
    "C:\Windows\system32\PsExec.exe" @C:\Test.txt cmd
    1. I am first connecting to the cmd of the remote computer and it connects successfully.
    2. When i enter the .exe file location on the command prompt (which is also in a shared drive but in the same domain).
    3. I ran the batch file as Run as administrator
    4. I am itself a member of the Domain admins and Administrators group of the domain.
    5. Turned off firewall on both sides.
    6. Turned off UAC fully as per the below MS article - http://technet.microsoft.com/en-us/library/cc709691(v=ws.10).aspx
    7. Pressed shift and right click so i will get the Run as option and mentioned different domain admins user account and password.
    Below is the screenshot for your reference: 
    Restated both the machines after doing these changes. But still the same issue.
    But still i get access is denied. Can anyone please help.
    Gautam.75801

    Few days back when i used to run the same task in this Access is denied mode its self. My destination server used to give a Audit failure event log as below.
    Now a days this event log does not come.
    Can this help for analysis.
    Subject:
    Security ID:
     Domain name\My username
    Account Name:
     Gautamr
    Account Domain:
    My Domain
    Logon ID:
     0x234992
    Object:
    Object Server:
    Security
    Object Type:
     File
    Object Name:
     C:\Windows\System32\eventvwr.msc
    Handle ID:
     0x0
    Process Information:
    Process ID:
     0x17e0
    Process Name:
     C:\Windows\System32\mmc.exe
    Access Request Information:
    Transaction ID:
    {00000000-0000-0000-0000-000000000000}
    Accesses:
     READ_CONTROL
    SYNCHRONIZE
    WriteData (or AddFile)
    AppendData (or AddSubdirectory or CreatePipeInstance)
    WriteEA
    ReadAttributes
    WriteAttributes
    Access Reasons:
    READ_CONTROL:
    Granted by
    D:(A;;0x1200a9;;;BA)
    SYNCHRONIZE:
     Granted by
    D:(A;;0x1200a9;;;BA)
    WriteData (or AddFile):
    Not granted
    AppendData (or AddSubdirectory or CreatePipeInstance):
    Not granted
    WriteEA:
     Not granted
    ReadAttributes:
    Granted by ACE on parent folder
    D:(A;;0x1301bf;;;BA)
    WriteAttributes:
    Not granted
    Access Mask:
     0x120196
    Privileges Used for Access Check:
    Restricted SID Count:
    0
    Gautam.75801

  • How can DTExec show the execution package progress while running it in the DOS console?

    [SSIS 2012]
    Hi,
    We need to view the package results/progress during the execution of the package by the DTExec command. Isn´t it possible?
    The user can´t view the details for the execution by the GUI.
    The package is deployed in the SSIDB (Catalog). The final idea is to Audit the result in a *.log file from the Batch we have created. We are not considering to use the "Logging" feature while designing the package. We expect to have same SSIS events
    in the DOS console while executing it.
    DTExec always says: To view the details for the execution, right-click on the Integration Services Catalog, and open the [All Executions] report
    How could it be possible?
    Thanks,
    Alex Berenguer

    Hi Alex,
    I don’t think it is possible to display the package execution details in the Command Prompt when we execute a package stored in the SSISDB catalog. Except for enabling the package logging, we have to view the execution details from the “All Executions” Standard
    Report for the SSISDB Catalog.
    Regards,
    Mike Yin
    TechNet Community Support

  • I cannot bring up the Java console from IE in WindowsXp

    Hi Team,
    My System contains Windows Xp as a operating System.
    My IE is unable to dispaly the applet's.Although my IE tells me that I have JRE running (under IE / Tools / Internet Options / Advanced), I cannot bring up the Java console also.
    I Checked in Control Panel/Java/show-console is activated. But i am unable to bring up the java console.
    Thanks
    T. Shankar Reddy

    I got the solution. Now my application is runnig successfuly.
    The problem is with J2SDK installation. I un-installed j2sdk1.4.2.08 and again I installed. then it is working properly.
    Thanks
    Shankar Reddy

  • I am unable to view source or bring up the error console in firefox 4

    I just upgraded from Firefox 3.6.15 to Firefox 4 on my Mac running Snow Leopard. I am unable to view the source of websites and I am unable to bring up the error console. When I try to do any of these tasks nothing happens.

    Same here, on Firefox 5.0

  • Exe file not producing the output files

    Could anyone please help me with my exe file. I have an exe file "exeFile" which takes more than one file as input from the source "c:/files" and produces some files as output into the destination "c:/files". Both my source and destination is same. My code given below is neither showing any error nor outputting any files. My code is:
    private static void compilingFiles() throws IOException
         String FirstParam = "C:/files";      
         String SecondParam = "C:/files";
         Process proc =Runtime.getRuntime().exec("cmd /c start /MIN C:/files/exeFile " + FirstParam, (String[])null, new File(SecondParam));
    }

    After going through The reference, I modified my code as under. My first exe file "tex" is doing the necessary as before, that is producing the output files to the destination, but the second exe file "fi2t1" is not producing the necessary output.
    My output after running this file is:
    <ERROR>
    </ERROR>
    Process exitValue1: 0
    <ERROR>
    </ERROR>
    Process exitValue2: 0
    <ERROR>
    </ERROR>
    Process exitValue1: 0
    <ERROR>
    </ERROR>
    Process exitValue2: 0
    <ERROR>
    </ERROR>
    Process exitValue1: 0
    <ERROR>
    </ERROR>
    Process exitValue2: 0
    So as per The reference, I think my code is right - "So, MediocreExecJavac works and produces an exit value of 2. Normally, an exit value of 0 indicates success; any nonzero value indicates an error.".
    So please tell me where am I wrong. My code is:
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.util.*;
    public class FontDriverCompile
         public FontDriverCompile()
         void compileFile(File newFile, String renameSub, File outputfile) throws IOException
              String FirstParam = "C:\\Temp\\sample\\font-driver.tex";  
              String FirstParam2 = "C:\\Temp\\sample";
              String SecondParam = "C:\\Temp\\sample";  
              try
                   Process proc1 =Runtime.getRuntime().exec("cmd /c start /MIN C:/Temp/sample/tex " + FirstParam, (String[])null, new File(SecondParam));
                   InputStream stderr = proc1.getErrorStream();
                   InputStreamReader isr = new InputStreamReader(stderr);
                   BufferedReader br = new BufferedReader(isr);
                   String line = null;
                   System.out.println("<ERROR>");
                   while ( (line = br.readLine()) != null)
                        System.out.println(line);
                   System.out.println("</ERROR>");
                   int exitVal1 = proc1.waitFor();
                   System.out.println("Process exitValue11: " + exitVal1);
              catch (Throwable t)
                   System.out.println("t.printStackTrace()_1");
                   t.printStackTrace();
              try
                   Process proc2 =Runtime.getRuntime().exec("cmd /c start /MIN C:/Temp/sample/fi2t1 " + FirstParam2, (String[])null, new File(SecondParam));
                   InputStream stderr = proc2.getErrorStream();
                   InputStreamReader isr = new InputStreamReader(stderr);
                   BufferedReader br = new BufferedReader(isr);
                   String line = null;
                   System.out.println("<ERROR>");
                   while( (line = br.readLine()) != null)
                        System.out.println(line);
                   System.out.println("</ERROR>");
                   int exitVal2 = proc2.waitFor();
                   System.out.println("Process exitValue2: " + exitVal2);
              catch (Throwable t)
                   System.out.println("t.printStackTrace()_2");
                   t.printStackTrace();
    }Message was edited by:
    sony_tj

Maybe you are looking for

  • Can not connect to network - Roaming

    Hi Guys, My step dad has come back from Dubai and updated his Z10 in the UK and now cannot call people back in Dubai (UAE). Any suggestions? Could it be that he updated his Z10 in the UK?  

  • Update stats Error

    Hi , I am getting below Error in update optimizer statistics in DB13. However i am able to run stats update with help of Brtools. this error comes after oracle upgrade from 10.0.2.4 to 11.2.0.2.0.  if anyone faced this error , please share resolution

  • Still Images & Need to 'Scale to Sequence'-Vertical vs. Horizontal Picture

    I make sequences from still images only. I need to start editing with all images at a Scale (in the Basic Motion section) of 100. When the original image is 720 width x 540 height (a picture taken horizontally), it appears in the timeline at a Basic

  • PDF Issues on my Mac in office, can anyone help somewhat of a newb here

    Okay, I know this is probably an easy fix, but I can't figure it out. When I create a doc in word and save it as a PDF it is saving it as super huge file, and there's no reason it should be doing that.... Can someone point me in the right direction o

  • Editing values within Dynamic ALV

    Hello All, I am currently working on dynamic ALV and want the columns to be editible. I have gone through the tutorial Link : [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783] and have cre