Results 1 to 3 of 3

Thread: How do i excute java program from asp.net

  1. #1
    Join Date
    Jan 2009
    Posts
    92

    How do i excute java program from asp.net

    Hey Folks,

    Can any body tell me that how do i excute java program from asp.net? Does any body knows about it? Kindly provide me the correct logical solution for the above issue. Any kind of help on the above issue would be appreciated.

    Thanks.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: How do i excute java program from asp.net

    This sample Java Program executes the 'dir' command reads the output of the dir command prints the results. This is just for understanding the concept, however, you may execute just about any command using this Runtime.getRuntime().exec() command.

    import java.io.*;

    public class doscmd
    {
    public static void main(String args[])
    {
    try
    {
    Process p=Runtime.getRuntime().exec("cmd /c dir");
    p.waitFor();
    BufferedReader reader=new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line=reader.readLine();
    while(line!=null)
    {
    System.out.println(line);
    line=reader.readLine();
    }

    }
    catch(IOException e1) {}
    catch(InterruptedException e2) {}

    System.out.println("Done");
    }
    }

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: How do i excute java program from asp.net

    jTask is a java applet which can execute java classes unattended and in a scheduled manner. This can execute any Java class with a main() method. It requires no special sub-classing or interface, so you can use any of your existing utilities without having to recompile them. Any DBA, Network Admin, or System Admin who is fluent in Java will find scheduling in this very easy. It supports features like built in logging capabilities, error notification on desktop or via email, flexible repetition (minute, day, week etc.), suppress execution before/after a specific date and time, invoke any Java class with a main() method, automatically detects when classes are re-compiled, includes wrapper class for running Windows EXE's.

Similar Threads

  1. How to run java applet program using cmd
    By Rao's in forum Software Development
    Replies: 3
    Last Post: 07-01-2012, 03:35 PM
  2. Dr. Java program
    By bamggut29 in forum Software Development
    Replies: 2
    Last Post: 26-11-2011, 04:24 AM
  3. Tagging java program
    By MonDo021 in forum Software Development
    Replies: 1
    Last Post: 01-04-2011, 11:36 PM
  4. GUI image program java
    By Caden Fernandes in forum Software Development
    Replies: 3
    Last Post: 12-11-2009, 11:48 AM
  5. Link List Example in Java Sample program in Java
    By trickson in forum Software Development
    Replies: 2
    Last Post: 04-08-2009, 08:23 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,059,770.85219 seconds with 17 queries