Inovoking a MS-Dos application using java

hi
I have .exe application which takes a parameter(name of a text file). I would like to know if I could write a java program to invoke the appliation take the input parameter and run the MS-dos application and how can it be done in java.
thanks in advance
jaggi

[url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html]java.lang.Runtime.[url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#exec(java.lang.String)]exec( ... ).

Similar Messages

  • I want to create a Ajax based Chating application using java .

    hi . I want to create an chating Application , and ajax based chatting application using java as my server side language ..i have some idea about it .. but one thing that i m not understanding is that how i will communicate with other users because each user has its own session so what i will do to send one messge to all the users ???? . i m new to JavaEE and i have chosen this as my semester project .. i need some help regarding this .

    First get it working without AJAX.

  • Deploying no java applications using Java Web Start

    Hi,
    I am new to java web start. Is it possible to distribute non java applications using java web start. I have an APP which can run on a desktop in standalone mode. The app has jusy HTML and Java script files. Is it possible to package this app and deploying using java web start? I am assuming If it is possible, I can make updates to the packaged app in the web servers and the updates will be downloaded next time the app is used provided configurations are correct?
    thx

    The app has jusy HTML and Java script files. Is it possible
    to package this app and deploying using java web start? Not really. Resources for JWS need to be zipped,
    while this HTML/JS app. will (I guess) not work from
    inside the depths of a Jar (or Zip) archive.
    Note that you can organise for those files to be
    downloaded and expanded onto a known place
    on the user's disk, by using an 'installer' element,
    but..
    ...I am assuming If it is possible, I can make updates to the
    packaged app in the web servers and the updates ..installers are only called once, and do not 'update'.

  • GIS applications using Java/SDO/MapViewer

    Hi everybody !
    First of all, sorry if my english is not soo good.
    I had installed MapViewer in my computer. It4s working perfectly.
    After view the JSP demo page and the Java demo program, I4m trying to create my own program, using the MapViewer.
    Well, before start my job, I wonder if there is anyone who has already create a application using Java, MapViewer and SDO.
    Is it really possible ?
    How is the productivity ?
    What are the major problems ?
    What are the alternatives ?
    Thanks,
         Rodrigo

    What XML Parser are you using to get an atributte4s value ?
    The JSP Demo makes a string comparison, but I want to use the XML Parser. How can I do this ?
    Response DTD Example:
    ~~~~~~~~~~~~~~~~~~~~
    <?xml version="1.0" encoding="UTF-8" ?>
    <map_response>
         <map_image>
              <map_content url="http://map.oracle.com/output/map029763.bmp" />
              <box srsName="default">
                   <coordinates>-122.260443,37.531621 -120.345,39.543</coordinates>
              </box>
              <WMTException version="1.0.0" error_code="SUCCESS"/>
         </map_image>
    </map_response>
    Questions:
    ~~~~~~~~~~~~~~
    - How can I get the value of the url atributte (http://map.oracle.com/output/map029763.bmp) ?
    - How can I get the value of the error_code atributte (SUCCESS) ?
    I4m holding the response DTD sending by MapViewer on a String variable.
    Thanks,
    Rodrigo

  • Executing Jar Application using Java Programs

    Hello there,
    How can I run a java application using java programs.
    Desc:
    public class someapp {
       public static void main(String[] ext) {
           // How can I execute a jar application from here through java code
    }

    You could use java.lang.Runtime.exec(). Another way could be loading the main class of the jar file and invoking its main method dynamically.

  • How to make destop application using java

    how to make destop application using java
    i mean to say when we double click on the exe file the program should lounch the application
    for windows

    when i double click ii got the msg
    Failed to lad main class manifest attribute from
    x/x/xyz.jar
    what exatly it meansIt means that your Manifest.MF for the JAR file should contain an attribute called Main-Class pointing to a class containing the main() method.
    Something like this should be present in META-INF/Manifest.MF :
    Main-Class: MyApplicationMain

  • Run a dos ommand using java

    Hi,
    I want to execute a dos command using java but i am geting some runtime execption.
    I code i wrote:
    ================
    import java.io.*;
    import java.util.*;
    public class docCom {
    public static Runtime run1 = Runtime.getRuntime();
    public static void main(String args[])
    try{
    BufferedReader in = null;
    //Runtime r = Runtime.getRuntime();
    String [] commands = {"ftp adas.co.in", "aaaaa", "zzzzz", "cd demo", "hash", "mget aaa.txt"};
    Process p = Runtime.getRuntime().exec(commands);
    String line = new String();
    if (p == null ) {
    System.out.println("Could not connect");
    in = new BufferedReader(new InputStreamReader(p.getInputStream()));
    while ((line = in.readLine()) != null ) {
    System.out.println (line);
    catch (IOException io){
    System.err.println(io.toString() + "*******" +io);
    The purpose of the code it to
    1) ftp server adas.co.in
    2) provide login and password info
    3) then mget a file from server to the local machine.
    Error i am geting
    java.io.IOException: CreateProcess: "ftp adas.co.in" aaaaa zzzzz "cd demo" hash"mget aaa.txt" error=2*******java.io.IOException: CreateProcess: "ftp adas.co.in" aaaaa zzzzz "cd demo" hash "mget aaa.txt" error=2
    Press any key to continue...

    Cross Post:
    http://forum.java.sun.com/thread.jspa?threadID=780815&messageID=4441376#4441376

  • Unable to run my application using java web start

    i have created one application and use java web start to download the application. all the files are succesfully downloaded but when i try to run the application an expected error occur. this only happen in my machine but not in other machine i'm currently using
    -jsdk1.4.2
    -windows 2000 professional 5.00.2195 service pack 3
    -pentium III 870 Mhz
    -x86-based PC
    -RAM 256 Mhz
    Anyone knows why, plz help me with this puzzle

    Please post the information from the Web Start "Exception" and "Wrapped Exception" tabs when the error occurs (I assume the error was in fact unexpected ;-)
    A blind stab in the dark would be that you don't have write permission to the cache directory on the second machine. Also worth checking that the proxy settings on the second machine are the same as the first (if they are on the same network).

  • How to build a small application using Java API

    Hai expertise,
         I want to retreive MDM repository info using JAVA API, i am following these blogs:
    /people/andreas.seifried/blog/2006/03/26/performing-free-form-searches-with-mdm-java-api
    /people/udi.katz/blog/2005/08/21/retrieving-data-from-mdm-server-using-the-mdm-java-api
    /people/udi.katz/blog/2005/07/17/mdm-connectivity-to-java-application
    <b>where to get the jar and sda files to build the application??
    In Developer Studio.. Windows -> Preferences -> Java -> Classpath variables. Is this the only place where we need to give the jar file path??
    Are there any other configurations to do(except setting container variable to MDM4J jar file) to connect my java application to MDM repository???</b>
    Regards,
    Chand.

    Hi Govada,
    (1)You need to add the MDM4j and other JAR files at:-
    right click on project -> Java Build Path -> Libraries -> Add External JARs
    (2)If the project is Web Dynpro project one
    then right click on project -> Web Dynpro Reference -> Library Reference -> and add sap.com/com.sap.mdm.tech.mdm4j
    Are you using JAVA API 1 or 2???
    Thanking you
    Namrata Dixit

  • Deploying pdf forms in an ES2 application using java

    Hi,
    Can we deploy pdfs,  xdps , processes etc in an application on livecycle ES2 using java ? I know we can deploy in resources using java but can we do the same in an ES2 application ? Somebody please provide some pointers .
    Thanks

    Here you go:
    http://help.adobe.com/en_US/livecycle/9.0/programLC/help/000315.html#1548555
    This quickstart shows you how to write a resource using the Java API. We use the term resource because you can put any file in an application.

  • Running Dos Command using Java

    How do i run a particular Dos command using a simple java class?

    Process process = Runtime.getRuntime().exec( ... );
    Search the forum. There are plenty of examples.

  • How to launch MS Word application using java

    HI:
    I'm developing a project using java, but we need to launch Microsoft Word into java based GUI(like Jpanel, or Frame, things like that), could anyone be so kind that give some hints on how to do it?
    thanks!

    I would be pleasantly shocked to find out this is possible. Well, let me retract that. You might, just very, very maybe, be able to use a combination of Windows API and Word's API (either DDE or OLE or ActiveX) to interact with Word. This will involve using a lot of native methods, javah and pre-compiled DLL's written in C or C++.
    But I think you will be completely stuck trying to get the UI to switch to a JPanel. Microsoft would have to have a version of Word independent of the UI (in effect, have designed Word to have a pluggable user interface). They may have done this, but I have never heard of a project where someone successfully swapped out Word's user interface with a custom Swing one.
    - Saish
    "My karma ran over your dogma." - Anon

  • Making '.exe' file/application using JAVA

    Hi,
    Is it possible to make an application(an exe file) using just Java, just as we in VB.If yes can you please give some idea how can we do that.
    Thanks.....

    To make a java application run from a click on an icon
    you must create a Jar file as I've explained below:
    Create a separate folder and place all the source code programs needed to run the application in it. You just need the ones with the .class extension. You don't need the ones with the .java extension.
    Open up 'Notepad' and type in this line:
         Main-Class: your class that has the main method
    You don't need the .class extension.
    ex. If your main method is in a program called HelloWorld.class
    type in :
    Main-Class: HelloWorld
    Make sure you hit the RETURN key at the end of the line. I forgot to do that which is why I spent four hours trying to get this to work!
    Save this as: manifest.mf
    and put in the same folder as above. Make sure it doesn't save as manifest.mf.txt
         Open MS-DOS.
    CD change to the directory and folder you are in.
    Type this in exactly as I have written:
    jar cvfm0 myprogram.jar manifest.mf *.class
         This should put a Jar file in your folder. Just click on it and it should work.
    Make sure the program doesn't need to take input from a command line, like DOS.
    Otherwise it will do nothing. As long as your program creates a frame, window, button or something, it should work.
         To run the Jar file from DOS(for testing purposes) type:
    java -jar myprogram.jar
         If you get an error stating that it can't find the main method class(like mine did), right click on the 'myprogram.jar' file that was created,
    click on properties, then ZipMagic.
    Open the 'manifest.mf' file and make sure
    that 'Main-Class: yourprogramname' is in there.
         If you followed these directions you should be able to create an executable java file.
    Below I've explained what the commands to create the Jar file mean.     
    jar: means you are creating a java archive file which acts like a ZIP file
    c: means create a new jar file
    v: means verbose which tells DOS to show the action it is doing
    f: means that the files to choose are going to be typed in by a user(you at the Dos prompt)
    m: means to use the manifest file that you specify
    0: means that the file won't be compressed
    To make a JAR file you only need the cfm letters.

  • How can i built a java application using java debug class on Log4J

    Hi,
    As java API support the MethodEntryEvent, using which I can get the automatic logging statements when the method is entered or exited as HelloExample.main(with argument type).
    Where HelloExample is the class name.
    Main is the method entered with its argument types.
    In some cases I have the o/p as
    -- VM Started --
    ====== main ======
    main -- HelloExample
    callerMethod -- HelloExample
    ====== main end ======
    -- The application exited --
    By using Log4J is there any possibility of getting these sort of o/p along with the loggers supported by Log4J. i mean to say can i built an java application which supports the MethodEntryEvent and MethodExitEvent from java API and also uses the Log4J debugging. I took an e.g. trace example, which (in J2SE 1.4.x or 5.x) will be found in $JAVA_HOME/demo/jpda/examples.jar and unpacking it by
    jar -xvf $JAVA_HOME/demo/jpda/examples.jar i found the com/sun/tools/example/trace/Trace.java and passed the class constructed with logger taken from Log4J. In this case the logging message is displayed on the console. As per the requirement i need to transfer the whole o/p to an output file along with Log4J logger statements. in this case i should not give any command in the cosule except compiling and executing the programme. the programm also should able to run without the main() as i need to integrate Log4J with an application and the code must me application server independent. i need the output as i got using MethodEnteryEvent (shown as above) in case of java application built using Log4J.
    Can any one help me in this regard. can any one give me some suggestion or any programme of this sort. All suggestions are welcomed.
    Thanks & Regards,

    hi,
    can someone help me how to implement logging for method entry parameters and
    method exit return value.
    can someone help me how to use log4j and integrate it to the method entry
    logging and method exit logging.
    Here what i need is without writing the log statements for the method entry and
    method exit i need to log it to the file
    along with other log4j debug statements i provide in the file.I should be able
    to configure whether to enable/disable the logging
    for method entry and method exit. In method entry i should be able to log the
    parameters the method take and in method exit
    i should be able to log te return value to the log file, before the method is
    returned to the callee.
    i hope i am clear
    Thanks in advance.

  • Need help in desigining Client/Server Application using Java

    Hi,
    I am new to Java and no sooner that I started studing it I have been given a project - client server java Application that allows a user to do a property search based on critiras (eg location, price) and display the results. I am stuck because I don't know where I need to start. Have to use IDE (Netbeans or Eclipse) but not sure about dev frameworks.
    Can someone give me an outline of what I should do / where I should start? What will be the best solution?
    Thanks in adance

    http://java.sun.com/docs/books/tutorial/networking/index.html
    That's Sun's networking tutorial series. Live it, learn it, love it. You'll need to decide if you want to use connected sockets or datagrams. You'll need details like, can multiple clients connect simultaneously?
    The tutorials are the first step though.

Maybe you are looking for