How to execute a Window program from Unix box using Java

I am trying to execut a program running on a Window box from Shell Script on a Unix box. Does anybody knows how to do that using Java. Thanks. Any feedback appreciated.
kevin

You need to use
String fileNane = "setup.exe";
Runtime.getRuntime().exec(fileName);that is if you are writing code
if you are just calling if from a terminal just write
java then the file name ( well I think that is right :)
I do know that the code above work as I have it working on a windoze box
Craig
Hope this is right if not please let me know

Similar Messages

  • Execute a Window program from Unix box using Java

    Hello everyone,
    I need to call a application running on a Window box from Shell Script on a Unix box. Does any one have some idea how to do it? Sample codes? I was thinking using Java. Any feedback appreciated.
    Thanks.
    CrossonKevin

    Search
    Profit
    http://onesearch.sun.com/search/developers/index.jsp?col=devforums&qp_name=Java+Programming&qp=forum%3A31&qt=execute+program

  • How to submit a cuncurrent program from UNIX?

    How to submit a concurrent program from UNIX.Plz reply immediatly

    Please see;
    Oracle Metalink Document: How to Submit a Concurrent Request Using CONCSUB Syntax: Doc ID: Note:457519.1
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:5250231761732667752::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,457519.1,1,1,0,helvetica
    Adith

  • How to execute a DOS PROGRAM as batch file  in java

    How to execute a DOS PROGRAM as batch file in java
    pls help me

    www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How to ftp to windows server from unix server

    Hi Gurus,
    Can anybody please guide me how to ftp the files to windows server from unix server. I can do the file transfer via unix by using the shell scripts, where as for windows how can we do that.
    Please advice.
    Regards
    Nagendra

    Hi.
    It's possible many solution.
    1. Setup Ftp server on Windows and use general scripts.
    http://support.microsoft.com/kb/323384
    2. Create general share folder on windows and use smbclient from samba.
    3. Create general share folder on windows and mount this folder to Linux.
    Reagrds.

  • How to execute a Perl program from within a Java prog

    How do I execute a Perl program from within a Java program.
    Lets say the Perl program that I want to execute is 'abc'. Now, 'abc' requires some input that I want to give it from within the Java program. How do I do it?
    And finally, how do I execute that Perl program from within the Java program.
    If I execute the Perl program alone then I do it in the following way -
    perl abc inp1 inp2 inp3
    where inp1, inp2, inp3 are inputs to the Perl program. I will not be able to change or modify the coding of the Perl program - 'abc' as I do not have access to its code. Its a kind of an application whose usual method of execution is in the above shown way. So, how do I execute 'abc' from within a Java program.

    what part of don't crosspost, don't you understand?
    http://forum.java.sun.com/thread.jsp?forum=4&thread=427193

  • How to close other Windows Programs from a Swing GUI ?

    I am making this really simple login program that once a user has successfully entered a username and password, and this is checked through a mySQL database , I run an Internet Explorer Windows.
    Now I am trying to setup a logout button and when they push this button ideally the open Internet Exlporer Windows would close.
    Does anyone have an idea how to do this is Swing or the wider java language or maybe even something built into windows ?
    S.

    It's as simple as obtaining references to the Windows and calling dispose() on them. How you obtain the references is entirely up to you. For example, you can create a List to hold all the children windows/dialogs that are created. And on logout you iterate through the list, dispose the child windows, and remove them from the list. Or maybe the child windows can add themselves as listeners to the logout button. When it's clicked and an ActionEvent is fired, the child windows can dispose of themselves automatically.

  • How to execute a windows program

    hi,
    I want to know how to launch IE or netscape browser from a java application.
    Thank you.

    Hi,
    you can do it this way.
    java.lang.Runtime.getRuntime().exec("cmd /c start iexplore c:/McCommissionReport.html");//for running on windows2000
    java.lang.Runtime.getRuntime().exec(" start iexplore C:/Report.html");//for running on windows95 and nt
    --sitas                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to delete a perticular node from xml file using java code

    Hii All,
    Now i am trying to delete a perticular node from xml file.Like...
    XML file:
    <Licence>
    <SERVER>
    <was id="1">1</was>
    <was id="2">2</was>
    </SERVER>
    </LICENCE>
    I am working in messaging service using JABBER framework with whiteboard facility.
    Here Some commands i have created to add,modify,delete nodes from xml file.They Are
    1.If u want to add a new node then.
    create Licence.SERVER <ss id="3">ddd</ss> lic.xml
    (here u want to add a new node called "ss" under Licence.SERVER.
    And lic.xml is tyhe xml file name where it was saved.
    2.If u want to delete a node(Suppose <was id="1">),then the command should be
    delete Licence.SERVER.was:id='"1" lic.xml
    A problem arises that here it find two was attributes.And it delete the last was attribute,not the requested node.
    PLEASE HELP ME IN SOLVING THIS CODE..
    ------------------------------------

    Looks like you clicked on "Post" before you pasted in the code you were talking about.

  • I want to be able to execute a swing program from my  desktop

    i want to be able to execute a swing program from my desktop but i dont know how to go about it. Till now to run the programs i used command prompt. please can you guys help me cross this huddle. I need step by step solution to do this

    In Windows, you associate a .jar file with javaw. YOu can do this with a right-click on the system icon, if I recall correctly.
    Another option is to wrap the jar file in an executable wrapper so it looks like an .exe. I have used JSmooth to good effect for this.
    Good luck. It is only modestly tricky

  • How do i stop my programs from automatically popping up when i turn on the computer?

    how do i stop my programs from automatically popping up when i turn on the computer?

    When you log out or shut down, there will be a checkbox that asks you if you want to reopen windows when you log in. Just uncheck this box. If that isn't it, you may have login items turned on. Go to System Preferences>Users and Groups and then under your name click the Login Itens tab. Make sure nothing is there.
    If you want to stop windows from restoring when you open applications (so for example when you open Safari it doesn't open the 50 tab page you just had open when you quit) go to SystemPreferences>General and then hit the checkbox that says Close windows when quitting an application.

  • How to execute a  .sql file from a batch file

    Hi all
    I've to take backup of a database weekly twice on every wednesday & Friday @ 5pm IST. I've written a hot backup script, which works every well.
    now i want to automate the script. ie i want this script to run on wednesday & friday @ 5pm without any human interfearance ie with out actually any1 executing this script.
    i created a batch file prod.bak with the following lines
    @echo off
    set oracle_sid=testdb
    set oracle_home=d:\oracle\ora92
    sqlplus /nolog
    connect sys as sysdba/oracletest@testdb
    this batch file when eexecuted connects me to sql prompt.
    Now i want to execute my backup script bkp.sql automatically when it is connected to sql prompt.
    (i tried with these lines in the above batch file...
    call bkp.sql---it just opens the bkp.sql file in notepad & displays the script
    start bkp.sql---same as call
    connect / as sysdba/pwd@[email protected] --- does not work simply remains a the sql prompt.
    At 17:00 /Every:w,f "d:\bkp.sql"---does not work simply remains at the sql promt.)
    Can any1 let me know what should i write in the batch file that will execute the bkp.sql file automatically after it gets connected to sql prompt. M using oracle 9i.
    I'll manage he time through windows utility of scheduling task.. Let me know how to execute the .sql file from a batch file.
    Thanks
    Tripti

    Try
    sqlplus "sys/oracletest as sysdba" @bpk.sql
    Working locally, and having set the ORACLE_SID, you don't need to specify the SqlNet alias (@testdb).
    Remember to put an exit at the end of the bpk.sql script.

  • HT1379 How do I stop a program from opening at start up(iPhoto)?

    How do I stop a program from opening at start up? (iPhoto)
    Also, my mac recently shuts down completely while in sleep mode.  Any reason why this happens?

    If the app is opened when you shut down the Mac, untick Restore windows when logging back in. Open System Preferences > Users and Groups > Login Items and delete iPhoto

  • How to connect to oracle9i database from Unix

    Hi All,
    How can i connect to remote oracle9i database(windows based) from Unix. I have following server information Server IP, Username , Userpassword , DataBase name.Do i need any other information to connect to server?
    How can i connect database from Putty?
    Do i need to install SQL on the Unix to connect to oracle server?
    and which C/C++ API i have to use to access tables from the remote oracle server?
    please help me i am new to oracle .
    Thanks in advance.

    Oracle generally uses a special set of software, commonly called the SQLNet or Oracle Networking, as a layer to provide a connection between the client and the database server.
    In general terms,
    - the client software (perhaps sqlplus, an application, ODBC) calls Oracle Networking on the client computer and says "please connect to database known as 'x'";
    - Oracle Networking translates the request, often by looking up 'x' in the TNSNAMES.ORA file at the client side, to get the host name, the port the Oracle listener is waiting on, and the name of the database service to access;
    - Oracle Networking contacts the computer on the required port. If the listener is there, the Oracle Networking client asks for a connection to the database service;
    - The Listener (if it recognizes it) asks the database service for a 'server process';
    - The database starts up a server process which grabs a network port and tells the listener which port was obtained;
    - The listener tells Oracle Networking on the client which port to use;
    - The client disconnects from the Listener, and reconnects at that port;
    - The server process starts authentication and session initialization, after which we are good to go.
    In answer to your questions:
    1) How can i connect database from Putty?
    That implies you want to telnet to the Windows box and run the client stuff locally on the Windows box. So that means you need to look at telnet or ssh documentation - this has nothing to do with Oracle.
    2) Do i need to install SQL on the Unix to connect to oracle server?
    Not really. It does mean you might want to install an Oracle CLIENT (see the download section of http://otn.oracle.com) which will initiate the sequence as above.
    A different sort of client is SQL Developer, a Java-based GUI with it's own built-in Oracle Networking, that displays database stuff. That is also offered by Oracle at the same download page.
    3) and which C/C++ API i have to use to access tables from the remote oracle server?
    Oracle provides a C/C++ API as a pre-processor, called Pro*C. I suspect this si way beyond what you want right now.
    4) please help me i am new to oracle .
    Please, please, please, please, please ..... please .... purchase and read http://www.oreilly.com/catalog/oressentials3/

  • How to execute a select statement in unix shell script

    Hi,
    How to execute the below statement in unix shell .
    select count( ID) into v_count from tbl_data1
    where ID =V_ID;
    thanks
    BCJ

    Thanks for the reply.
    few more doubts,
    the V_ID value is a user input getting inside the unix script, so how can i pass the value in to the a.sql.
    also needs the v_count value inside the unix script for further process.actual requirement is like,
    declare
    v_count number;
    begin
    select count( ID) into v_count from tbl_data1
    where ID =$V_ID;
    if v_count>1 then
    process 1;
    else
    process2;
    end if;
    end;
    thanks a lot

Maybe you are looking for

  • We have 3 devices used by 3 different people under the same Apple ID, how do I stop getting my daughters texts, both sent and received?

    We have 3 devices used by 3 different people under the same Apple ID, how do I stop receiving my daughters texts? Both sent and received.

  • Retrieving Acrobat Pro 9 Serial Number before installing Windows 7

    Hi everyone, I need to format the hard drive to install Windows 7 on a computer running Windows XP x64 and the user is not able to find it nor to tell me if it is a boxed version or a downloaded version possibly bought from the University Campus book

  • Change the PDF form In HAP_DOCUMENT

    Hi Experts, 1)I have a requirement wherein i need to change the pdf form that is generated when we click on download button in hap_document bsp application. I need to use the custom PDF form in place of the actual PDF form. How can i acheive this? 2)

  • Contra Entry & Cash/bank Payment

    Hi All I want to know that from where should i enter the contra entries ...Outing payments & Incomming payments or Journal Voucher. There is a bit confusion regarding the daily cash and  bank payments other than the invoices...which screen should i u

  • Matchcode - HitList

    Hi everyone. I'm working on a search help, using a search help exit. When I test the search help, the results appears in a hit list. I need to know if it is possible to select data from this hit list and select data from another table using the data