Java calling .NET exec

Discussion in 'Java' started by olegkon, Apr 29, 2010.

  1. olegkon

    olegkon Guest

    Hi,

    I need to write a Java program which:
    - collects bunch of data from the SQL Server DB (and builds command
    line);
    - calls windows executable (3rd party, black box, I assume it's
    written with .NET 3.5 - maybe VB or C#, but have no source code or
    anything)
    and passes it long list of parameters.

    My Java program will be packaged as executable JAR and reside on some
    Windows XP server.
    It will be called from job scheduler.
    So basically it will be a Java wrapper for that .NET exec.

    Could anyone help me with a sample skeleton code to call .NET
    executable ?

    Sorry, I have no experience with that, I am more of Java/Flex Web
    developer.


    TIA,
    Oleg.
     
    olegkon, Apr 29, 2010
    #1
    1. Advertising

  2. olegkon

    Jeff Higgins Guest

    On 4/29/2010 11:28 AM, olegkon wrote:
    > Could anyone help me with a sample skeleton code to call .NET
    > executable ?

    Well, not exactly .NET but may be useful:
    <http://www.devdaily.com/java/java-exec-processbuilder-process-1>
     
    Jeff Higgins, Apr 29, 2010
    #2
    1. Advertising

  3. olegkon

    Arne Vajhøj Guest

    On 29-04-2010 11:28, olegkon wrote:
    > I need to write a Java program which:
    > - collects bunch of data from the SQL Server DB (and builds command
    > line);
    > - calls windows executable (3rd party, black box, I assume it's
    > written with .NET 3.5 - maybe VB or C#, but have no source code or
    > anything)
    > and passes it long list of parameters.
    >
    > My Java program will be packaged as executable JAR and reside on some
    > Windows XP server.
    > It will be called from job scheduler.
    > So basically it will be a Java wrapper for that .NET exec.
    >
    > Could anyone help me with a sample skeleton code to call .NET
    > executable ?
    >
    > Sorry, I have no experience with that, I am more of Java/Flex Web
    > developer.


    Runtime.getRuntime().exec(new String[] { "prog", "arg1", "arg2" });

    if you need to read output then you need a bit more.

    Arne
     
    Arne Vajhøj, Apr 30, 2010
    #3
  4. olegkon

    olegkon

    Joined:
    May 6, 2010
    Messages:
    2
    Thank you, guys !

    Another related question.
    So suppose I am calling that
    Runtime.getRuntime().exec(new String[] {"prog1" "param1" "param2"});

    Is there any limitation to the size of that parameters line on Windows XP ?
    I have to pass a huge parameters list, something over 8Kb.

    Is that possible ?

    If not, how can we overcome it ?

    Any code samples ?

    Please advise,
    Oleg.
     
    olegkon, May 6, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hal Vaughan
    Replies:
    11
    Views:
    1,172
    Gordon Beaton
    May 22, 2006
  2. tedsuzman
    Replies:
    2
    Views:
    7,144
    Michel Claveau, résurectionné d'outre-bombe inform
    Jul 21, 2004
  3. Ted
    Replies:
    1
    Views:
    483
    Duncan Booth
    Jul 22, 2004
  4. olegkon

    Calling .NET exec from Java

    olegkon, May 6, 2010, in forum: Java
    Replies:
    4
    Views:
    640
    Wojtek
    May 7, 2010
  5. Guillermo Riojas
    Replies:
    0
    Views:
    191
    Guillermo Riojas
    Nov 26, 2010
Loading...

Share This Page