Error running batch files from java source file???

Dear Friends,
hi,
this is with response to a doubt i had earlier ,
i want to run batch files from the java source file ,i tried using this code (here batrun is the batch file name that contains commands to run other java files)
try
String [] command = {"c:\\vishal\\finalmain\\batrun"};
Runtime.getRuntime().exec(command);
catch(Exception e)
but i got the following error.
java.io.IOException: CreateProcess: gnagarrun error= 2
plz. help me, i tried all combination w/o success,
in anticipation(if possible give the code after testing)
Vishal.

hello there,
i solved the prob. by using
cmd /c start filename ,but i need to pass parameters ie
cmd /c start java "c:/vishal/runfile a b" where a and b are the parameters. but it is not accepting this in Runtime.getRuntime.exec(),
any solutions ?????????
regards,
Vishal

Similar Messages

  • Error while compiling the ejb java source files.................

    hi,
    i am new to ejb.......
    i have got error while compiling the ejb java source files............
    while compiling..........of this three i ahve got err in ejb home interface....
    ejb remote interface - succeded
    ejb bean class - succeded
    ejb home interface - error
    the error..............is in the return type of the ejb create() method in ejb home interface(which is the type of remote interface).
    the error message is cannot resolve symbol

    Hi,
    thanks for ur reply .....
    i have done enough searching in all sites including sun forum but in vain
    i have pasted my error below...
    can u plz predict anything from it
    D:\>path=%path%;c:\j2sdk1.4.2_12\bin;
    D:\>set classpath=%classpath%;d:\Sun\AppServer\lib\j2ee.jar;
    D:\>javac d:\Librarys\Library.java
    D:\>javac d:\Librarys\LibraryBean.java
    D:\>javac d:\Librarys\LibraryHome.java
    d:\Librarys\LibraryHome.java:8: cannot resolve symbol
    symbol : class Library
    location: interface Librarys.LibraryHome
    public Library create(String id, String name, String address, String phoneNo
    ) throws RemoteException, CreateException;
    ^
    d:\Librarys\LibraryHome.java:9: cannot resolve symbol
    symbol : class Library
    location: interface Librarys.LibraryHome
    public Library findByPrimaryKey(String id) throws FinderException, RemoteExc
    eption;
    ^
    2 errors
    thanks in advance...

  • Going from .java source files to a .jar

    If my source files are .java, how can I make a .jar out of them from the command line? I have 4 main files, each a class with plenty of inner classes...how do I turn those files into something jar.exe wants? And if/when I get the .jar archive created, how do I set the class with the main class? Thanks for any help guys and gals!
    Fair

    This is not new info, just restating previous replies 1 and 2. (In case there's a misunderstanding...)
    You must create class files by compiling xxx.java with the java compiler, this creates xxx.class, which contains an intermediate 'bytecode' version of the source - it's not readable by humans. The xxx.class file can be interpreted (run) by the java interpreter, thus: java xxx **OR** it can be placed in a jar file, and if done properly the jar file is executable.The 2nd reply by kelle3 gives the way that the jar file is created. If the xxx.class file(s) can be interpreted, they are valid. I'm not sure what you're looking at when you say you 'opened mine', as that requires that you disassemble a class file, which I don't think you're doing.
    If you're still having problems either 1) search the forums for '.jar', there are many threads like this, or 2) go here http://java.sun.com/docs/books/tutorial/jar/basics/index.html
    Hope this assists.

  • Encore CS4 error "could not read from the source file"

    - Source File: C:\Users\Anil\AppData\Local\Temp\2013 11 08 c Big Budha_9.prproj
    - Output File: F:\Adobe Encoded Blu-ray\For Disk #013\Disk#013-B\2013 11 08 c Big Budha.m2v
    - Preset Used: Full HD 1080i [MPEG] 30 MBPS
    - Video:
    - Audio:
    - Bitrate:
    - Encoding Time: 01:49:53
    25-Jan-14 2:50:32 PM : Encoding Failed
    Could not read from the source. Please check if it has moved or been deleted.
    i have tried creaeted a NEW Premiere Pro project and still get the same error again ... can someone help me to figure out what is wrong ...

    Hi Neil
    I have been using file names with spaces and it has been working fine. As stated in reply to Jones, uninstall and reinstall of Premiere Pro CS4 has helped to get rid of this error.
    also i did not use Dynamic link, but was trying to create MPEG file using Media Encoder and then import it in Encore.
    your suggestion for H264 seems good and will try it.
    x264 Pro is for CS5 and above versions, so it seems i can not use it and have to manage with Adobe Media Encoder's default. Hope i will not have any major technical issues.
    please suggest me for below:-
    1) i have 4 hours of Full HD footage and made 1080i MPEG2 files of 30mbps to fit in 2 seperate Bluray Disks.
    2) now i plan to put all in one Single Bluray Disk by reducing MPEG2 file average data rate to 15mbps. will that work or is there any limitation of time in Bluray Disk.
    3) Will it be ok to create H264 files at 30mbps [as you mentioned H264 reduces file size to half of MPEG] and still be able to fit 4 hours footage in one BR Disk ?
    4) even though i specify Min 10 Target 25 Max 30 data rate for MPEG files creation, it creats file at data rate of 30 mbps, can you explain why it is happening as i thought my target rate should be 25 mbps and not the maximum rate specified.
    Thanks ...
    PS...
    my source file is .mov 1920 x 1080i 29.97 fps from Canon 6D. first i tried to create progressive file in Encoder but while imported in Encore realised at 29.97 fps, it allows only interlaced file and had to transcode back to interlaced. so i stick to interlaced file.
    Canon 6D also allows me to shoot in 24fps [motion movie] which Encore can handle as progressive file for authoring. What are the pro and cons of shooting in 24fps, if you can suggest.
    Message was edited by: AnilHVarma

  • Creating win 32 exe files from java class files

    Hi I am using windows 2000.
    I have developed a java swing gui application that has about 10 class files. I downloaded the microsoft sdk for java 4.0 for converting all my class files into a single .exe file. I used jexegen in this SDK to do this process. But when I double click the exe file, it just pops up and closes instantenously without showing my startup frame.
    Can anyone help ?

    There is no Microsoft solution for this until you get J#, change your program
    (J# is a little bit different that java but not much, it's closer to Java than C#)
    and then compile to Win32 .exe.
    For the refrence list of all Java to Native code compilers, check this page:
    http://www.geocities.com/marcoschmidt.geo/jcomp.html#native :
    Different from "normal" compilers (like javac or jikes), native compilers do not create bytecode files
    (.class) that are interpreted by a Java Virtual Machine but native executables (like .exe files on
    Windows). "How do I create an EXE from Java?" is a very frequently asked question in newsgroups
    like comp.lang.java.programmer, native compilers are the answer. Some native compilers are listed
    below, check them out.

  • How to create .exe files from Java class files?

    I'm new to Java and I just wonder if it is possible to make executable files out of Java class files. I've checked the Java online help and several search engines, but I still couldn't find anything about that. Is it possible to do so? If not, why not?
    Thanx a lot for any help.

    I don't remember if there is a program that converts the class file,
    but I do know that there are a few that either convert the class file,
    or the .java file. You might try searching for ".java to .exe" in the
    search engine and seeing what that pulls up.

  • Cannot run batch program from Java Application

    Hi All,
    Im trying to run a batch file under windows from my Java Program. The batch file is located in the following path:
    C:\Program Files\MyApp\runme.bat
    The above-entioned path contains white space which is not allowed in NT.
    Im trying following code:
    import java.io.*;
    public class Exec {
    public static void main(String args) {
    try {
    Runtime.getRuntime().exec("cmd /c start C:/Program Files/MyApp/runme.bat");
    }catch(Exception ex){ ex.printStackTrace();}
    How to run this file?
    Thanks in advance.
    Ketan Malekar

    or use the overload that takes an array of strings as argument
    String[] command = {"cmd", "/c", "start", "C:/Program Files/MyApp/runme.bat");
    Runtime.getRuntime().exec(command);

  • How to debug byteCode? Can cap file convert to java source file?

    Are there tools can debug byteCode?
    Are there tools can convert cap file to java source file?
    Are there tools can convert jca file to java soure file?

    I think it's little bit difficult to give you a correct answer. Frankly speaking, cap file debugging is possible if you have sufficient devices and knowledge to do that. Converting cap file to java source code is also possible only if the cap file has descriptor component in it. Names of variables, functions will not be completely restored because cap file doesn't have the names in it. But I am not sure that there is a publicly opened tool to do that. JCVM chapter 6 may show you the way even it's not the direct one.

  • Getting error Can't read from the source or disk when moving documents from one folder to another folder in the library

    Hi,
    When we try to move documents from one folder to another folder in the document library using "Open with explorer" getting beloe error.
         Can read from the source file or disk.
        The user having below permission for the Library as well as site.
    Fullcontrol,Limited access--->Given directly
    Read,Limited access--->Givin through the all Test grp
    Contribute,Limited Access-->given through test members grp
    Read,Limited access---> givin through The group grp
    Could you please help me anyone....
    Thanks

    Hi Reddy,
    If you are moving files in two libraries in different sites, then the error will occur and it is by design that there are limitations on the DAV move commands that the DAV client is respecting.
    https://social.msdn.microsoft.com/Forums/en-US/6245f332-c609-4a7b-8e00-c8b5e46f7759/cant-move-files-using-windows-explorer-cant-read-from-source?forum=sharepointgeneral
    If you are moving files in the same library, I recommend you to use Wireshark to reveal the error message and enable IIS
    Trace Logging for Failed Requests to examine the IIS log file for troubleshooting.
    https://social.msdn.microsoft.com/Forums/en-US/47cd569d-98f2-4cca-b78e-fd178c097285/cant-read-from-the-source-file-or-disk?forum=sharepointgeneralprevious
    To narrow down the issue scope, I recommend you to test with another library and see if the copy in explorer can work.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Error to generate webservice from java file with JAXWS

    I need to build a webservice to run on Glassfish, but I have problems, I did downloaded the latest JAX-WS recently(2 days).
    I have the follow class to generate a wsdl file:
    package com.dudhoo.farmacopedia.web;
    import com.dudhoo.farmacopedia.web.hibernate.FarmacopediaKey;
    import com.dudhoo.farmacopedia.web.key.KeyGenerator;
    import java.util.Calendar;
    import java.util.Date;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    @WebService(serviceName="FarmacoWebService", name="nomeservice")  
    public class FarmacoWebService {
        public FarmacoWebService() {
        @WebMethod()
        public Date getServerTime(){
            return Calendar.getInstance().getTime();
        public FarmacopediaKey generateSerial(Date ini, int dias){
            return new KeyGenerator().generateKey(ini, dias);
    }I have the follow ant code:
    <?xml version="1.0" encoding="windows-1252" ?>
    <!--Ant buildfile generated by Oracle JDeveloper 10g-->
    <!--Generated 01/08/2006 22:56:00-->
    <project name="FarmacoWeb" default="all" basedir=".">
      <property file="build.properties"/>
      <path id="classpath">
        <fileset dir="../libs/" includes="**/*.jar"/>   
      </path>
      <path id="jaxws.classpath">
        <fileset dir="../libs/jaxws" includes="**/*.jar"/>   
      </path>
      <target name="init">
        <tstamp/>
        <mkdir dir="${output.dir}"/>
        <mkdir dir="${output.dir}/new"/>
        <mkdir dir="${output.dir}/res"/>
      </target>
      <target name="all" description="Build the project" depends="compile,copy"/>
      <target name="clean" description="Clean the project">
        <delete includeemptydirs="true" quiet="true">
          <fileset dir="${output.dir}" includes="**/*"/>
        </delete>
      </target>
      <target name="compile" description="Compile Java source files" depends="init">
        <javac destdir="${output.dir}" classpathref="classpath"
               debug="${javac.debug}" nowarn="${javac.nowarn}"
               deprecation="${javac.deprecation}" encoding="Cp1252" source="1.5"
               target="1.5">
          <src path="src"/>
        </javac>
      </target>
      <target name="copy" description="Copy files to output directory"
              depends="init">
        <patternset id="copy.patterns">
          <include name="**/*.gif"/>
          <include name="**/*.GIF"/>
          <include name="**/*.jpg"/>
          <include name="**/*.JPG"/>
          <include name="**/*.jpeg"/>
          <include name="**/*.JPEG"/>
          <include name="**/*.png"/>
          <include name="**/*.PNG"/>
          <include name="**/*.properties"/>
          <include name="**/*.xml"/>
          <include name="**/*-apf.xml"/>
          <include name="**/*.ejx"/>
          <include name="**/*.xcfg"/>
          <include name="**/*.cpx"/>
          <include name="**/*.dcx"/>
          <include name="**/*.wsdl"/>
          <include name="**/*.ini"/>
          <include name="**/*.tld"/>
          <include name="**/*.tag"/>
        </patternset>
        <copy todir="${output.dir}">
          <fileset dir="src">
            <patternset refid="copy.patterns"/>
          </fileset>
        </copy>
      </target>
      <target name="-pre-dist" >
            <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
                <classpath refid="classpath"/>
            </taskdef>
            <wsgen
                debug="true"
                keep="true"
                destdir="${output.dir}/new"
                resourcedestdir="${output.dir}/res"
                sei="com.dudhoo.farmacopedia.web.FarmacoWebService">
                <classpath>
                    <pathelement path="${jaxws.classpath}"/>
                    <pathelement location="${output.dir}"/>               
                </classpath>
            </wsgen>
        </target>
    </project>When I run ant the the follow error is throwed:
    Buildfile: /home/duduzera/jdevhome/mywork/Farmaco/FarmacoWeb/build.xml
    -pre-dist:
        [wsgen] Problem encountered during annotation processing;
        [wsgen] see stacktrace below for more information.
        [wsgen] java.lang.NoSuchMethodError: javax.jws.WebMethod.exclude()Z
        [wsgen]      at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.hasWebMethods(WebServiceVisitor.java:373)
        [wsgen]      at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.shouldProcessWebService(WebServiceVisitor.java:349)
        [wsgen]      at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:143)
        [wsgen]      at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
        [wsgen]      at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:345)
        [wsgen]      at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:230)
        [wsgen]      at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
        [wsgen]      at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
        [wsgen]      at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
        [wsgen]      at com.sun.tools.apt.main.Main.compile(Main.java:1075)
        [wsgen]      at com.sun.tools.apt.main.Main.compile(Main.java:938)
        [wsgen]      at com.sun.tools.apt.Main.processing(Main.java:95)
        [wsgen]      at com.sun.tools.apt.Main.process(Main.java:85)
        [wsgen]      at com.sun.tools.apt.Main.process(Main.java:67)
        [wsgen]      at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:603)
        [wsgen]      at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:536)
        [wsgen]      at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:54)
        [wsgen]      at com.sun.tools.ws.ant.WsGen.execute(WsGen.java:457)
        [wsgen]      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        [wsgen]      at org.apache.tools.ant.Task.perform(Task.java:364)
        [wsgen]      at org.apache.tools.ant.Target.execute(Target.java:341)
        [wsgen]      at org.apache.tools.ant.Target.performTasks(Target.java:369)
        [wsgen]      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        [wsgen]      at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        [wsgen]      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        [wsgen]      at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        [wsgen]      at oracle.jdevimpl.ant.runner.AntLauncher.launch(AntLauncher.java:321)
        [wsgen]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        [wsgen]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        [wsgen]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        [wsgen]      at java.lang.reflect.Method.invoke(Method.java:585)
        [wsgen]      at oracle.jdevimpl.ant.runner.InProcessAntStarter.runAnt(InProcessAntStarter.java:293)
        [wsgen]      at oracle.jdevimpl.ant.runner.InProcessAntStarter.mav$runAnt(InProcessAntStarter.java)
        [wsgen]      at oracle.jdevimpl.ant.runner.InProcessAntStarter$1.run(InProcessAntStarter.java:71)
        [wsgen] error: compilation failed, errors should have been reported
        [wsgen]
    BUILD SUCCESSFUL
    Total time: 3 secondsI'm using JDeveloper 10g. Did someone had problems like this?
    I think the problem maybe is caused by jar lib concurrences...
    thanks

    You get that error when response headers have already been sent to the client (browser). This can happen in two ways that I know of:
    - you flushed data to the client, or somewhere the data was automatically flushed
    - you already did a redirect/forward and are attempting to do a second one.
    So if you want to prevent yourself from getting the error, you'll need to make sure that neither of the situations has occurred. Don't output content unless you are absolutely certain that you won't need to foward/redirect later and don't do a redirect/forward twice in the same resource.

  • Executing batch file from Java stored procedure hang

    Dears,
    I'm using the following code to execute batch file from Java Stored procedure, which is working fine from Java IDE JDeveloper 10.1.3.4.
    public static String runFile(String drive)
    String result = "";
    String content = "echo off\n" + "vol " + drive + ": | find /i \"Serial Number is\"";
    try {
    File directory = new File(drive + ":");
    File file = File.createTempFile("bb1", ".bat", directory);
    file.deleteOnExit();
    FileWriter fw = new java.io.FileWriter(file);
    fw.write(content);
    fw.close();
    // The next line is the command causing the problem
    Process p = Runtime.getRuntime().exec("cmd.exe /c " + file.getPath());
    BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line;
    while ((line = input.readLine()) != null)
    result += line;
    input.close();
    file.delete();
    result = result.substring( result.lastIndexOf( ' ' )).trim();
    } catch (Exception e) {
    e.printStackTrace();
    result = e.getClass().getName() + " : " + e.getMessage();
    return result;
    The above code is used in getting the volume of a drive on windows, something like "80EC-C230"
    I gave the SYSTEM schema the required privilege to execute the code.
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'java.io.FilePermission', '&lt;&lt;ALL FILES&gt;&gt;', 'read ,write, execute, delete');
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    GRANT JAVAUSERPRIV TO SYSTEM;
    I have used the following to load the class in Oracle 9ir2 DB:
    loadjava -u [system/******@orcl|mailto:system/******@orcl] -v -resolve C:\Server\src\net\dev\Util.java
    CREATE FUNCTION A1(drive IN VARCHAR2) RETURN VARCHAR2 AS LANGUAGE JAVA NAME 'net.dev.Util.a1(java.lang.String) return java.lang.String';
    variable serial1 varchar2(1000);
    call A1( 'C' ) into :serial1;
    The problem that it hangs when I execute the call to the function (I have indicated the line causing the problem in a comment in the code).
    I have seen similar problems on other forums, but no solution posted
    [http://oracle.ittoolbox.com/groups/technical-functional/oracle-jdeveloper-l/run-an-exe-file-using-oracle-database-trigger-1567662]
    I have posted this in JDeveloper forum ([t-853821]) but suggested to post for forum in DB.
    Can anyne help?

    Dear Peter,
    You are totally right, I got this as mistake copy paste. I'm just having a Java utility for running external files outside Oracle DB, this is the method runFile()
    I'm passing it the content of script and names of file to be created on the fly and executed then deleted, sorry for the mistake in creating caller function.
    The main point, how I claim that the line in code where creating external process is the problem. I have tried the code with commenting this line and it was working ok, I made this to make sure of the permission required that I need to give to the schema passing security permission problems.
    The function script is running perfect if I'm executing vbs script outside Oracle using something like "cscript //NoLogo aaa1.vbs", but when I use the command line the call just never returns to me "cmd.exe /c bb1.bat".
    where content of bb1.bat as follows:
    echo off
    vol C: | find /i "Serial Number is"
    The above batch file just get the serial number of hard drive assigned when windows formatted HD.
    Same code runs outside Oracle just fine, but inside Oracle doesn't return if I exectued the following:
    variable serial1 varchar2(1000);
    call A1( 'C' ) into :serial1;
    Never returns
    Thanks for tracing teh issue to that details ;) hope you coul help.

  • Forte compile error java source files must have a .java suffix

    Hello Guru's,
    I am using Forte for Java release 2.0 build 1160, and Java SDK 1.3.1.
    When I try to compile a project in Forte I get the following error :
    "fastjavac: java source files must have a .java suffix C:\Program"
    I have looked at the source files and they do hav .java suffix!
    If this is not the correct form can someone point me in the right direction. If this is a correct forum then help is very much appreciated.
    Cheers...Harki

    Hi,
    Try to compile like this:
    javac yourfile.java
    Hope this helps you.
    Cheers.....Dinesh

  • Running  .nsi file from java

    hi,
    Ho to run .nsi file from java.
    thanks in advance.

    User845466 wrote:
    Ho to run .nsi file from java.Find the program hanling that kind of documents an launch this via Runtime.exec() giving it your *.nsi file as a parameter.
    bye
    TPD

  • Passing variable from one java source file to another

    i have one java source file
    one.java
    class one {
    long a;
    a = somevalue;
    i have another java source file
    second.java
    class second{
    long b;
    // here i need to assign the value of a i.e from one.java to b
    i am in great confusion and begineer of java
    plz plz help me

    a couple of possibilities are
    pass a parameter to the constructor
    or
    use the reference to class Two to call a method in class Two that takes a parameter and sets the value of the attribute in class Two.

  • How to run Executables or .bat files from Java?

    Hi!
    I need to open a Web Browser from Java App.
    Please, help me to do this without calling JNI
    -or-
    provide me with sample which works with
    Runtime.execute() method.
    I have done full permission:
    grant
         permission java.security.AllPermission "","";
    };Thank You in advance!

    To run any command from java code, the method is
    Runtime.getRuntime().exec( myCommandString )
    Where, myCommandString is something like "/full/pathname/command".
    If the pathname contains spaces, e.g. "c:\program files\windows\notepad", then enclose it in quotes within the quoted string. Or pre-tokenize them into elements of an array and call exec(String[] cmd) instead of exec(String cmd).
    From JDK1.3 there are two new overloaded Runtime.exec() methods. These allow you to specify starting directory for the child process.
    Note, there is a gotcha associated with reading output from commands. When the runtime exec's the process, it passes to it 3 streams, for stdin, stdout, and stderr; the out and err are buffered but the buffer size isn't very big. When your process runs, it reads (if needed) from in, and writes to out and err.
    If it doesn't write more than the buffer-size, it can run to completion.
    But if it tries to write more data to one or the other stream than the buffer can hold, the write blocks, and your process hangs, waiting for you to empty the buffer so it can write some more.
    So after the exec call, get the streams, and read from them in a loop until they both hit end-of-stream (don't block on either one, just read whatever is available from each, each loop iteration).
    Then when the streams have ended, call the process.waitFor() method to let it finish dying.
    Now, here is a code snippet how you achieve this.
    String strCommand = "cmd.exe /c " + strCommand;
    boolean bWait = true;
    //execute the command
    try
         Runtime r = Runtime.getRuntime();
         Process pr = r.exec(strCommand);
         Process pr = r.exec(callAndArgs);
         BufferedInputStream bis =new BufferedInputStream(pr.getInputStream ());
         int c=0;
         /** Outlet for IO for the process **/
         while (c!=-1)
              c=bis.read();
         /**Now wait for the process to get finished **/
         if(bWait == true)
              pr.waitFor();
              pr.destroy();
    catch(Exception e)
         System.out.println("Could not execute process " + strCommand);
         return(false);

Maybe you are looking for

  • What are the best sequence presets and settings to use in FCE for the best resolution with the least amount on strain on computer?

    Hello! Can someone please help me figure out the best settings to use in order to obtain the best resolution in FCE4 for a television show that is going to be sent out on full size Sony DVcam tapes, with 4:3 aspect ration and audio output at 48kHz? I

  • Using Image Processor from Bridge

    I'm trying to use the image processor from within Bridge. I have done this several times in the past, as recently as last week. I have some files selected in Bridge. I select "Tools>Photoshop>Image Processor" and the dialog box opens. Step 1 indicate

  • IWeb published to .mac- slideshow not working

    The slideshow and 'click to enlarge' features are not working. The button is there, but nothing happens when I (or anyone) click on them. How do I activate these functions? Also, I downloaded Moble Me, but I don't think I activated it because when I

  • Problem working with LAUNCH_BROWSER apdu

    Hi there, I am currently developing a STK based application from which i would like do a LAUNCH_BROWSER. I managed to get the browser open from the STK menu, but the problem is that the browser open behind the STK menu. So as a user they will have to

  • Documents related to PI

    Hi Friends, I am new to PI and finding it difficult to locate some good material on PI online. Could someone kindly help me with locating some documents related to SAP PI. Thank you in advance. Warm Regards, Balaji.K