Need info about Runtime.exec

Hello, I have a non program specific question about how Runtime.exec works. First off assume that I handle all my input streams and output streams correctly, and I am not worried about inter process communication. The question is, when I use Runtime.getRuntime().exec(cmd[],pth[],dir) does the JVM that is running the code that calls it live until the spawned process dies, or can it die without waiting for the execed process to die? I am trying to write an app that can spawn a new copy of itself that is completely independent from the original process, and may live on long after the original is no longer needed. To ensure proper resource management I need to know that the JVM that launches the new process does not have to wait for the new process to die prior to completely cleaning itself up.
Does that make sense?
Any suggestions, ideas, questions?
Thanks in advance for the help.
Message was edited by:
elixic

Thank you all who gave useful input. I had done some reading on this already and could not find a definite answer on weather or not the calling JVM can properly dispose of itself prior to the process it called being disposed of.
The answer it seems is dependent on context. In windows, and from a GUI app, it looks like the calling JVM can die any time it wants too. A command line app on the other hand seems to have to wait for the app it called to die first. I have not tested it on other OS's but I am sure it varies by OS as well. I would not even be surprised if it varies by JVM.
So the short answer to my question that you all helped me find is this, It varies by context.
Thanks again for the help.
Isaac

Similar Messages

  • Question about Runtime.exec

    Rob,
    Thanks for your help.
    I asked a question about a weird Exception on Nov 14, and you told me that I am
    using Runtime.exec to start an external process, and that process is crashing.
    I am a green-hand on Weblogic, and I am trying to enhancing a project developped
    by another person, so I am not familiar with some concepts yet.
    Could you please give me some simple explanation about Runtime.exec and external
    process?
    I found two methods that uses "Runtime" from two classes as following, could you
    help me to see whether or not there is something wrong with the usage of Runtime?
    Thank you very much.
    private int runShellCommand(String command) {
    int exitVal = -1;
    try {
    File runDir = new File(runDirectory);
    String[] env = new String[0];
    Runtime rt = Runtime.getRuntime();
                   double start = System.currentTimeMillis();
    Process proc = rt.exec(command, env, runDir);
    // Capture output in separate thread
    ThreadedStreamReader error = new ThreadedStreamReader(proc.getErrorStream(),
    "ERROR");
    ThreadedStreamReader output = new ThreadedStreamReader(proc.getInputStream(),
    "OUTPUT");
    error.start();
    output.start();
    exitVal = proc.waitFor();
    if (logger.isDebugEnabled()) {
         double runtime = (System.currentTimeMillis() - start) / 1000.0;
         logger.info("run " + runId + " " + command + " finished in " + runtime
    + " seconds");
    } catch (IOException e) {
    logger.fatal("DOE-2 failed \n" + e.getMessage());
    } catch (InterruptedException e) {
    e.printStackTrace();
    return exitVal;
    public static void main(String[] args) throws Exception, InterruptedException
    final Doe2MessageServer server = new Doe2MessageServer();
    while(!connected) {
    Thread.sleep(1000);
    logger.info("Attempting to start JMS service ...");
                   try {
              server.init();
                   } catch (Exception ex) {
    // shutdown hook to close JMS connection
    Runtime.getRuntime().addShutdownHook(
    new Thread() {
    public void run() {
    server.finalize();
    server.receiveMessage();

    Runtime.exec is a J2SE API. It's not really specific to WLS.
    You can read about it here:
    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
    It looks like you are starting a JMS Server in a separate process and
    that process is crashing.
    (You could of course just use WLS's JMS Server instead :>)
    -- Rob
    Iris Qu wrote:
    Rob,
    Thanks for your help.
    I asked a question about a weird Exception on Nov 14, and you told me that I am
    using Runtime.exec to start an external process, and that process is crashing.
    I am a green-hand on Weblogic, and I am trying to enhancing a project developped
    by another person, so I am not familiar with some concepts yet.
    Could you please give me some simple explanation about Runtime.exec and external
    process?
    I found two methods that uses "Runtime" from two classes as following, could you
    help me to see whether or not there is something wrong with the usage of Runtime?
    Thank you very much.
    private int runShellCommand(String command) {
    int exitVal = -1;
    try {
    File runDir = new File(runDirectory);
    String[] env = new String[0];
    Runtime rt = Runtime.getRuntime();
                   double start = System.currentTimeMillis();
    Process proc = rt.exec(command, env, runDir);
    // Capture output in separate thread
    ThreadedStreamReader error = new ThreadedStreamReader(proc.getErrorStream(),
    "ERROR");
    ThreadedStreamReader output = new ThreadedStreamReader(proc.getInputStream(),
    "OUTPUT");
    error.start();
    output.start();
    exitVal = proc.waitFor();
    if (logger.isDebugEnabled()) {
         double runtime = (System.currentTimeMillis() - start) / 1000.0;
         logger.info("run " + runId + " " + command + " finished in " + runtime
    + " seconds");
    } catch (IOException e) {
    logger.fatal("DOE-2 failed \n" + e.getMessage());
    } catch (InterruptedException e) {
    e.printStackTrace();
    return exitVal;
    public static void main(String[] args) throws Exception, InterruptedException
    final Doe2MessageServer server = new Doe2MessageServer();
    while(!connected) {
    Thread.sleep(1000);
    logger.info("Attempting to start JMS service ...");
                   try {
              server.init();
                   } catch (Exception ex) {
    // shutdown hook to close JMS connection
    Runtime.getRuntime().addShutdownHook(
    new Thread() {
    public void run() {
    server.finalize();
    server.receiveMessage();

  • Need Info about BW CRM Analytics

    Hi all,
    Guys,
    Please help me out...
    I need Info about BW with CRM Analytics
    What are the core areas where data's are extracted for CRM to BW
    What will be the Interview question related to BW CRM Analytics
    If possible if u have any docs kindly email me at [email protected]
    Thanks in Advance.
    Jaffer Ali.S

    Dear Jaffer Ali S.,
    The following types of analyses can be carried out:
    <b>CRM Lead Analysis</b>
    Use the InfoCube CRM Lead Management (Technical Name: 0MKTG_C01) for reporting.
    The Lead Management InfoCube contains all the characteristics and data used for the administration of leads. This InfoCube enables you to execute the following standard queries available in SAP BW:
    Channel Analysis
    Efficiency Reporting
    Historical Evaluation
    Lost Leads
    Channel Management: Top-n Lost Leads (Current Year)
    <b>CRM Activities Analysis</b>
    Use the InfoCube CRM Activities (Technical Name 0CSAL_C01) for reporting.
    The InfoCube for activities in CRM provides the data basis for evaluating business activities undertaken by your employees. It provides you with information about how much time is being spent on contacting the customer, whether customers actively seek out contact with your company and how intensively your employees look after your customers. It delivers data for queries such as:
    Intensity of customer care
    Activity History
    Success/failure analysis
    <b>Customer Interaction Center (CIC)</b>
    Activate the InfoCube Interactive Scripting Evaluation (IC WinClient) 0CRM_CIC1.
    Interactive Scripting Evaluation (IC WinClient)
    This InfoCube provides the data base for the interactive scripting evaluation. It supplies the data to the Interaction Center (IC): Interactive Scripting Evaluation query.
    <b>Opportunities Analysis</b>
    Activate InfoCube 0CRM_C04 - Opportunities.
    The CRM Opportunities InfoCube contains all the characteristics and data used for the opportunities analyses.
    <b>Sales Order Complaints Analysis</b>
    Activate InfoCube Complaints (Technical name: 0CSAL_C09).
    You can carry out the complaint analysis on a daily, monthly, weekly or a quarterly basis. The analysis can be done in relation to CRM Service Organization, CRM Sales Organization, CRM Product, and Sold-To Party.
    <b>Service Qualtiy Analysis</b>
    Activate the MultiProvider 0CSRVMC04 - CRM Service - Orders and Confirmations with Complaints.
    The MultiProvider 0CSRVMC04 - CRM Service - Orders and Confirmations with Complaints gets the data from the following ODS objects for analyses in various queries:
    0CRM_PROI - Orders: Item Data
    0CRM_COI - Controlling (Item Data)
    0CRM_CNFI - Confirmations (Item Data)
    0CRM_COMP - CRM Complaints (Items)
    Let me know if you need further help.
    Reward points if it helps.
    Regards,
    Naveen.

  • I need info about CL_XML_DOCUMENT

    Hi to all,
    I need info about the class CL_XML_DOCUMENT and his methods.
    I only have seen information of a few methods.
    Where can I find more information and examples of use about this class?

    Hi,
    This question is already answered before in this forum, check out the below link -
    Information about CL_XML_DOCUMENT
    Hope this helps.

  • How to make this works. it's about Runtime.exec().

    hi' i really need help about this.
    i have 2 class file. one named GoodWindowsExec that used to execute another file named maintest. (i post my code below). When i run GoodWindowsExec there's no problem but not working correctly.
    What i need is i can write something directly from my keyboard not via GoodWindowsExec file. So maintest can run normally just like when i execute it manual (java maintest from commandprompt) and display the output. If you look at the maintest file, this file need input from user. But why i can't doing this directly? How to implement this?
    This is java code that i need to execute (maintest) just for sample :
    public class maintest
         public static void main(String[] args)
              try
                   BufferedReader bfr = new BufferedReader(new InputStreamReader(System.in));
                   System.out.print("Try input word : ");
                   String readInput = bfr.readLine();
                   /* String readInput = bfr.readLine(); i think this is the problem.
                    * If i remove this, GoodWindowsExec works fine.
                    * But i cannot remove it. This is my point.
                    * i want try to solve this */
                   System.out.println(readInput);
              catch(Exception e)
                   System.out.println(e);
    }This is my code (GoodWindowsExec) which used to execute maintest :
    public class GoodWindowsExec
         public GoodWindowsExec()
              try
                   String[] cmd = new String[]{"cmd.exe","/C","java","maintest"};
                Runtime rt = Runtime.getRuntime();
                   Process proc = rt.exec(cmd);
                   InputStream inStream = proc.getInputStream();
                   BufferedReader bfr = new BufferedReader(new InputStreamReader(inStream));
                   response res_in = new response(bfr);
                   InputStream errorStream = proc.getErrorStream();
                   BufferedReader errorBfr = new BufferedReader(new InputStreamReader(errorStream));
                   response res_err = new response(errorBfr);
                   res_in.start();
                   res_err.start();
                   OutputStream otStream = proc.getOutputStream();
                   DataOutputStream write = new DataOutputStream(otStream);
                   write.writeUTF("something");
                   /* write.writeUTF("something");
                    * i really don't know about this.
                    * if i declare this, the input not come from maintest / user directly.
                    * if i create some java editor application and want to execute some java code
                    * this is not right. cos input comes from this class not the execute class (maintest).
                    * How to make the input comes from user / execute class?
                   write.flush();
                   write.close();
                int exitVal = proc.waitFor();
                System.out.println("ExitValue: " + exitVal);       
              catch (Throwable t)
                 t.printStackTrace();
        public static void main(String args[])
              new GoodWindowsExec();
    class response extends Thread
         BufferedReader bfr;
         public response(BufferedReader bfr)
              this.bfr = bfr;
         public void run()
              try
                   String line = null;
                   while ( (line = bfr.readLine()) != null)
                             System.out.println(line);   
              catch (IOException ioe)
               ioe.printStackTrace(); 
    }Thank you very much...

    Hi' i think i have same problems with you. but now i think i got it after read this article. Thanks for both of you. specially sabre150.
    But i want to ask about this to sabre150. What if maintest try to request more than one input? How to handle it? and why Try input word : display at the second line? not the first line?
    i'm sorry if i modify this, but i change it like this :
    class outputer :
    public void run()
         try
              bfr = new BufferedReader(new InputStreamReader(System.in));
              String input = null;
              while ((input = bfr.readLine()) != null)
                   write.writeBytes(input);     
                   write.flush();
                   write.close();
         catch(Exception e)
              e.printStackTrace();
    }maintest :
    public class maintest
         public static void main(String[] args)
              try
                   BufferedReader bfr = new BufferedReader(new InputStreamReader(System.in));
                   System.out.print("Try input word : ");
                   String readInput = bfr.readLine();
                   System.out.println(readInput);
                   System.out.print("Try input word again : ");
                   String readInput2 = bfr.readLine();
                   System.out.println(readInput2);
              catch(Exception e)
                   System.out.println(e);
    }When i execute i got this :
    test //request for first input
    Try input word : test
    Try input word again : null
    ExitValue: 0
    halo //request for second input
    java.io.IOException: The handle is invalid
         at java.io.FileOutputStream.writeBytes(Native Method)
         at java.io.FileOutputStream.write(Unknown Source)
         at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
         at java.io.BufferedOutputStream.flush(Unknown Source)
         at java.io.DataOutputStream.flush(Unknown Source)
         at outputer.run(GoodWindowsExec.java:78)Maybe you know the answer sabre150?
    Thanks...
    Message was edited by:
    2Puluh11Lapan3

  • Need help with Runtime.exec()

    I need help getting my program to run a different java program through the command prompt using the runtime.exec() method. This is my code so far:
    import javax.swing.JOptionPane;
    import javax.swing.JDialog;
    import javax.swing.JButton;
    import javax.swing.JRadioButton;
    import javax.swing.ButtonGroup;
    import javax.swing.JLabel;
    import javax.swing.ImageIcon;
    import javax.swing.BoxLayout;
    import javax.swing.Box;
    import javax.swing.BorderFactory;
    import javax.swing.border.Border;
    import javax.swing.JTabbedPane;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.*;
    //import java.Original.*;
    //import java.Turtle.*;
    //import jav.Turtle.galapagos.*;
    public class JavaMenu extends JPanel
         JFrame frame;
         JLabel label;
         JButton select;
         String labDescription = "Java labs created in class.";
         String turtleDescription = "Turtle labs created in class";
         String creationDescription = "Java programs created on my own.";
         public JavaMenu(JFrame frame)
              super(new BorderLayout());
              JPanel lab = labDialog();
              //JPanel turtle = turtleDialog();
              //JPanel creation = creationDialog();
              label = new JLabel("Click Select Program to run the program.", JLabel.CENTER);
              this.frame = frame;
              Border padding = BorderFactory.createEmptyBorder(20,20,5,20);
              lab.setBorder(padding);
              //turtle.setBorder(padding);
              //creation.setBorder(padding);
              JTabbedPane tab = new JTabbedPane();
              tab.addTab("Java Labs", null, lab, labDescription);
              //tab.addTab("Turtle Labs", null, turtle, turtleDescription);
              //tab.addTab("Java Programs", null, creation, creationDescription);
              add(tab, BorderLayout.CENTER);
              add(label, BorderLayout.PAGE_END);
              label.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
         void setLabel(String newText)
              label.setText(newText);
         protected static ImageIcon createImageIcon(String path)
            java.net.URL imgURL = JavaMenu.class.getResource(path);
            if (imgURL != null) {
                return new ImageIcon(imgURL);
            } else {
                System.err.println("Couldn't find file: " + path);
                return null;
         private JPanel labDialog()
              final int numButtons = 25;
              JRadioButton[] javalabs = new JRadioButton[numButtons];
              final ButtonGroup group = new ButtonGroup();
              select = null;
              final String messageCommand2 = "Lab 02";
              final String messageCommand3 = "Lab 03";
              final String messageCommand4 = "Lab 04";
              final String messageCommand41 = "Lab 04 Extra Credit 1";
              final String messageCommand42 = "Lab 04 Extra Credit 2";
              final String messageCommand5 = "Lab 05";
              final String messageCommand51 = "Lab 05 Extra Credit";
              final String messageCommand6 = "Lab 06";
              final String messageCommand6b = "Lab 06";
              final String messageCommand7 = "Lab 07";
              final String messageCommand71 = "Lab 07 Extra Credit";
              final String messageCommand8 = "Lab 08";
              final String messageCommand8b = "Lab 08";
              final String messageCommand81 = "Lab 08 Extra Credit";
              final String messageCommand9 = "Lab 09";
              final String messageCommand9b = "Lab 09";
              final String messageCommand91 = "Lab 09 Extra Credit 1";
              final String messageCommand92 = "Lab 09 Extra Credit 2";
              final String messageCommand93 = "Lab 09 Extra Credit 3";
              final String messageCommand9a = "Lab 09 American Flag";
              final String messageCommand9t = "Lab 09 Texas Flag";
              final String messageCommand0 = "Lab 10";
              final String messageCommand0b = "Lab 10 Hi Lo Game";
              final String messageCommand01 = "Lab 10 Extra Credit 1";
              final String messageCommand02 = "Lab 10 Extra Credit 2";
              javalabs[0] = new JRadioButton("Lab 02 100 Point Version");
              javalabs[0].setActionCommand(messageCommand2);
              javalabs[1] = new JRadioButton("Lab 03 100 Point Version");
              javalabs[1].setActionCommand(messageCommand3);
              javalabs[2] = new JRadioButton("Lab 04 100 Point Version");
              javalabs[2].setActionCommand(messageCommand4);
              javalabs[3] = new JRadioButton("Lab 04 Extra Credit 1");
              javalabs[3].setActionCommand(messageCommand41);
              javalabs[4] = new JRadioButton("Lab 04 Extra Credit 2");
              javalabs[4].setActionCommand(messageCommand42);
              javalabs[5] = new JRadioButton("Lab 05 100 Point Version");
              javalabs[5].setActionCommand(messageCommand5);
              javalabs[6] = new JRadioButton("Lab 05 Extra Credit");
              javalabs[6].setActionCommand(messageCommand51);
              javalabs[7] = new JRadioButton("Lab 06A 100 Point Version");
              javalabs[7].setActionCommand(messageCommand6);
              javalabs[8] = new JRadioButton("Lab 06B 100 Point Version");
              javalabs[8].setActionCommand(messageCommand6b);
              javalabs[9] = new JRadioButton("Lab 07 100 Point Version");
              javalabs[9].setActionCommand(messageCommand7);
              javalabs[10] = new JRadioButton("Lab 07 Extra Credit");
              javalabs[10].setActionCommand(messageCommand71);
              javalabs[11] = new JRadioButton("Lab 08A 100 Point Version");
              javalabs[11].setActionCommand(messageCommand8);
              javalabs[12] = new JRadioButton("Lab 08B 100 Point Version");
              javalabs[12].setActionCommand(messageCommand8b);
              javalabs[13] = new JRadioButton("Lab 08 Extra Credit");
              javalabs[13].setActionCommand(messageCommand81);
              javalabs[14] = new JRadioButton("Lab 09A 100 Point Version");
              javalabs[14].setActionCommand(messageCommand9);
              javalabs[15] = new JRadioButton("Lab 09B 100 Point Version");
              javalabs[15].setActionCommand(messageCommand9b);
              javalabs[16] = new JRadioButton("Lab 09 Texas Flag");
              javalabs[16].setActionCommand(messageCommand9t);
              javalabs[17] = new JRadioButton("Lab 09 American Flag");
              javalabs[17].setActionCommand(messageCommand9a);
              javalabs[18] = new JRadioButton("Lab 09 Extra Credit 1");
              javalabs[18].setActionCommand(messageCommand91);
              javalabs[19] = new JRadioButton("Lab 09 Extra Credit 2");
              javalabs[19].setActionCommand(messageCommand92);
              javalabs[20] = new JRadioButton("Lab 09 Extra Credit 3");
              javalabs[20].setActionCommand(messageCommand93);
              javalabs[21] = new JRadioButton("Lab 10 A 100 Point Version");
              javalabs[21].setActionCommand(messageCommand0);
              javalabs[22] = new JRadioButton("Lab 10 B 100 Point Version");
              javalabs[22].setActionCommand(messageCommand0b);
              javalabs[23] = new JRadioButton("Lab 10 Extra Credit 1");
              javalabs[23].setActionCommand(messageCommand01);
              javalabs[24] = new JRadioButton("Lab 10 Extra Credit 2");
              javalabs[24].setActionCommand(messageCommand02);     
              for (int k = 0; k < numButtons; k++)
                   group.add(javalabs[k]);
              javalabs[0].setSelected(true);
              select = new JButton("Select Program");
              select.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e)
                        String command = group.getSelection().getActionCommand();
                        if (command == messageCommand2)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                 try
                                    Runtime.getRuntime().exec(new String[] {"cmd", "set classpath=D:/Documents and Settings/Yinon Michaeli/My Documents/CS/java/Labs02", "path C:/j2sdk1.4.0/bin", "java Lab020"});
                                    //File file = new File("java/Labs02");
                                    //Runtime.getRuntime().exec(new String[] {"rundll32", "url.dll,FileProtocolHandler","file:///" + file.getAbsolutePath()});
                                 catch (Exception a)
                                      JOptionPane.showMessageDialog(frame, "Error: Exception.", "Error", JOptionPane.ERROR_MESSAGE);
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand3)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand4)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand41)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand42)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand5)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand51)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand6)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand6b)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand7)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand71)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand8)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand8b)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand81)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand9)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand91)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand9t)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand9a)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand9b)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand92)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand93)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand0)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand0b)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand01)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        if (command == messageCommand02)
                             int confirm = JOptionPane.showConfirmDialog(frame, "You are about to run the program, o.k.?", "Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
                             if (confirm == JOptionPane.YES_OPTION)
                                  setLabel("Awesome!");
                             else if(confirm == JOptionPane.NO_OPTION)
                                  setLabel("You've got to be kidding!");
                        return;
              return create2ColPane(labDescription + ":", javalabs, select);     
         private JPanel createPane(String description, JRadioButton[] radioButtons, JButton showButton)
              int numChoices = radioButtons.length;
            JPanel box = new JPanel();
            JLabel label = new JLabel(description);
            box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));
            box.add(label);
            for (int k = 0; k < numChoices; k++)
                box.add(radioButtons[k]);
            JPanel pane = new JPanel(new BorderLayout());
            pane.add(box, BorderLayout.PAGE_START);
            pane.add(showButton, BorderLayout.PAGE_END);
            return pane;
        private JPanel create2ColPane(String description, JRadioButton[] radioButtons, JButton showButton)
            JLabel label = new JLabel(description);
            int numPerColumn = radioButtons.length/2;
            JPanel grid = new JPanel(new GridLayout(0, 2));
            for (int k = 0; k < numPerColumn; k++)
                grid.add(radioButtons[k]);
                grid.add(radioButtons[k + numPerColumn]);
            JPanel box = new JPanel();
            box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));
            box.add(label);
            grid.setAlignmentX(0.0f);
            box.add(grid);
            JPanel pane = new JPanel(new BorderLayout());
            pane.add(box, BorderLayout.PAGE_START);
            pane.add(showButton, BorderLayout.PAGE_END);
            return pane;
        private static void createAndShowGUI()
             JFrame.setDefaultLookAndFeelDecorated(true);
             JFrame frame = new JFrame("Java Programs");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JavaMenu newContentPane = new JavaMenu(frame);
            newContentPane.setOpaque(true);
            frame.setContentPane(newContentPane);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args)
             javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

    Why are you posting hundreds of lines of code not related to the problem??? 99.9% of the code you posted has absolutely nothing to do with using the Runtime.exec() method.
    Create a simple test program that simply tries to invoke the Runtime.exec() method. Once you get that working, then you incoporate it into you real program. Don't clutter the forum with unnecessary code.
    public class WindowsFileProtocolHandler
         public static void main(String[] args)
              throws Exception
              String[] cmd = new String[4];
              cmd[0] = "cmd.exe";
              cmd[1] = "/C";
              cmd[2] = "java";
              cmd[3] = "YourClassHere";
              Process process = Runtime.getRuntime().exec( cmd );
    }

  • Need info about RH Server 6 and reports

    I'm interisted in RH Server 6 but I'm unable to locate much
    practical info about it on the Web site, and a call to sales didn't
    help. I need to know what I'm getting us into before I contribute
    our $2,000. Can anyone provide this information or point me to its
    location on the site:
    --I have system requirements from the Adobe site, but what is
    the "server" and what does installation and setup entail? About how
    how long does it take, or how difficult, to achieve operability?
    --According to a piece by John Daigle, the server component
    should be installed on a Windows server running IIS 5+. Is IIS a
    separate software or standart part of Windows server? If separate,
    what preparation should that server have before the installation in
    addition to installation of IIS?
    --I know nothing about security/firewall protocols. We will
    have our own and our customer firewalls to navigate. Are the server
    setup instructions adequate for setting all that up? Or are
    purchasers expected to have sys admins knowledgeable to set that
    up? Is that applied to the RH server or the Windows server? if RH
    server, how can I get a copy of instructions for my system people
    to review?
    --Have users found the RH server/RoboEngine reliable, once
    it's operable?
    --Is it true that the usage reports aren't customizable? Can
    additional usage data be specified in the RH server?
    --These report summaries are vague--Areas Requiing Help,
    Frequently Viewed Content--stating only that repoorts show the
    suchandsuch done "most frequently" or "most often." Does that mean
    the top 3, 5, 10 or what? Is there a way to track all of that
    activity from most to least?
    --The summaries of the reports Unanswered Questions and
    Frequently Asked Questions say that terms entered in the Search
    field are identified. Questions and terms aren't the same in my
    book--am I right that it captures anything entered? Can it do the
    same for the Index field?
    --I saw no RH server under downloads, or maybe missed it.
    Correct in guessing that a demo version is not available?
    --Is RH server user doc available on the web site? I found
    the Getting Started gude, which isn't much use in evaluating the
    product.
    I have additional questions, but if you can answer these
    questions or direct me to answers some of those may be covered.
    Thanks,
    Mike
    Access database.

    Hey, Mike!
    I found a few things for you. I'm in a hurry, so I'll list
    them quickly.
    For the Trial, go to the Adobe downloads page
    http://www.adobe.com/downloads/
    Then select RoboHelp Server 6 from the dropdown list. You
    will be asked to register (free) if you haven't already. When you
    arrive at the download page make sure you note the Trial Serial #
    To make it easier for you, its:
    1336-1033-2628-5062-0993-4570
    You can also find a RoboHelp Server 6 Getting Started Guide
    here
    http://www.adobe.com/support/robohelp/downloads/getting_started_rh6_server.pdf
    You were asking about IIS. Yes. As Colum says, this comes
    with virtually any version of Windows Server (or Windows XP
    Professional). However, you must install and configure it. I am not
    an IT or web administrator so it took me a while to learn, but
    amazingly I got it to work if you're patient and follow the steps.
    (I'm speaking of both IIS and Robohelp Server) Clearly IIS
    configuration is not a trivial thing and it is assumed that an
    author would have help and cooperation from the IT or Web Admin
    folks.
    As for customizing reports. At present, the existing reports
    are the only ones offered. Since these reports are generated from a
    database (Access, SQL Server or Oracle) I would think (haven't done
    it myself) that someone familiar with database adminstration could
    open the DB (after a backup that is) and be more creative with
    generating customized reports.
    You are right that the "Question" does in fact mean any
    search term or phrase that an end user puts in the search field.
    This is the string that is stored and reported as a question. In
    discussing this with the Adobe team at STC last month, they agreed
    that this was definitely a holdover from the legacy software and is
    due for a change sometime in the future.
    To answer your other question, text entered in the Index
    field is not stored in the database, only the search term field.
    Since taking on the old legacy product from eHelp and
    Macromedia, Adobe is focusing most of its attention on beefing up
    the client authoring app for the next version (Adobe RoboHelp 7).
    My assumption is that they are keen on improving the RoboHelp
    Server as well. I have passed along many feature requests along the
    lines you seem to suggest and hopefully the server will evolve
    along with the client app.
    Even with its limitations, my clients tell me RoboHelp Server
    provides very useful feedback to help them improve their knowledge
    base content to make it more helpful and responsive to users needs.
    They also like the searchability of PDF, Word, PPT and Excel as
    well...something which plain WebHelp without the RoboHelp Server
    does not do.
    I probably didn't get to everything, but hope this helps.
    John

  • Need info about 2006s(5.1/5.2)

    Hi,
    Need some info about the new product 2006s (5.1/5.2), what are the new features, whats new on the technology side, what skill sets will be required for these products.
    is  GUI/SPRO still there in the new products or some new config tool is being introduced.
    any info is helpful, pls share usefull docs, links to SAP docs.
    pls email me at [email protected]
    thanks
    RH

    Hi rh,
        The theory is a new interface, replace gui an pcui. The configuration is based in business roles and this configuration is with spro customizing. Web Client tecnology based and the most important news is a new configuration tool to modify the layout.
    Regards.
    Manuel

  • Need info about GN_INVOICE_CREATE

    Hi experts!
    I need to create Credit / Debit memo invoices in my Z program, so I decided to use GN_INVOICE_CREATE for this, but can not find info about parametres of this FM....
    could anyone explaine how to use this FM or maybe someone has a peace of sample code of using this FM?
    Helpful answers and advices will be rewarded.
    Here is this FM:
    CALL FUNCTION 'GN_INVOICE_CREATE'
      EXPORTING
        DELIVERY_DATE           =
        INVOICE_DATE              =
        INVOICE_TYPE              =
        PRICING_DATE              =
        VBSK_I                          =
        WITH_POSTING              =
        CALLER_TYPE               =
        I_WITHOUT_REFRESH    =
        ID_NO_ENQUEUE           =
        ID_KVORG                      =
        ID_NO_DIALOG                =
        ID_NEW_CANCELLATION =
      IMPORTING
        VBSK_E                           =
      TABLES
        XKOMFK                           =
        XKOMFKGN                      =
        XKOMFKKO                      =
      XKOMFKTX                         =
        XKOMV                             =
        XTHEAD                            =
        XVBFS                              =
        XVBPA                              =
        XVBRK                              =
        XVBRP                              =
        XVBSS                              =
      XKOMFKZM                         =
      SUCCESS_DOC_OUT          =          .

    Hi Mindaugas,
    check BAPIinvoice in SE37, e, here u cannt directly make use of GN_invoice_create, Bcos here u dont have condition records data.
    so search in SE37 or Tcode BAPI , here u can get FMs along with Documentations.
    Regards
    Peram

  • Needed info about io devices and cpu without using prtdiag

    Hi
    I need to collect info about io devices and cpu. but i cannot use prtdiag.
    is there any way to collect this information on solaris machine....
    may any available c APIs
    Thanks in advance.
    Nagesh

    yep.... prtconf -vp | grep <wot u r looking 4>

  • Very very urgent! Please help about Runtime.exec on Solaris

    I wrote a software in Java.
    It contains a platform application and a variety of client applicaitons.
    Both use Swing MMI. I need my own JRE and invoke client from
    platform MMI. On Windows, the software run ok. But on Solaris,
    client are always blocked to do work.
    Whe run platform and client individually from command line,
    client will run ok too. While client is invoked by platform in programm,
    it will be blocked to run (client cannot recieve data from RS232).
    I noticed that client will continue to run once platform exits.
    So I really wonder whether there is something wrong with my codes
    to invoke client. Only Solaris invoking codes list here.
      public static boolean exec(String execStr) {
        Runtime runtime = Runtime.getRuntime();
        try {
          String[] args  = new String[] {
                "/bin/sh", "-c", execStr};
            Process p = runtime.exec(args);
            return true;
          return false;
         catch (Exception e) {
          e.printStackTrace();
        return false;
      }

    The execStr argment is
    /users/devConfig/jre/java -classpath "/users/devConfig/jre/lib:/users/devConfig/lib/ssop.jar:
    /users/devConfig/lib/zt103.jar..." zt.client.nsd200v.NSD200VApp ...Where /users/devConfig is my software installed directory, and /users/devConfig/jre is my own packaged JRE1.5.0.

  • Need info about programming with InCopy

    Hi,
    I have a client who has stored thousands of InCopy documents with valid styles applied to segments of it.
    Now my requirement is to create a template which has XML tag -> Style mapping.
    Considering that template, I am suppose to open all the InCopy documents, apply that Tag -> Style mapping to it and then convert all of them to XML and persist the data in DB.
    Is there a programmatic way as to apply XML tags to a document based on the styles used?
    Please educate. I am a complete newbie to InCopy - so please bare with my questions,
    Thank you, Appreciate your help.
    Regards,
    Chintan

    You could download and deploy "struts-example.war" from apache website.
              [That Struts 1.0.2 I think.]
              ---Nam
              Jordy wrote:
              > I want to find out how to use it with WL 7.0. Would anyone give me any info about it? :) Thanks
              And God said
              Let there be numbers
              And there were numbers.
              Odd and even created he them,
              He said to them be fruitful and multiply,
              And he commanded them to keep the laws of induction.
              [Bill Taylor [email protected]]
              [nam_nguyen.vcf]
              

  • Need Info about using Strut with WL 7.0

    I want to find out how to use it with WL 7.0. Would anyone give me any info about it? :) Thanks
              

    You could download and deploy "struts-example.war" from apache website.
              [That Struts 1.0.2 I think.]
              ---Nam
              Jordy wrote:
              > I want to find out how to use it with WL 7.0. Would anyone give me any info about it? :) Thanks
              And God said
              Let there be numbers
              And there were numbers.
              Odd and even created he them,
              He said to them be fruitful and multiply,
              And he commanded them to keep the laws of induction.
              [Bill Taylor [email protected]]
              [nam_nguyen.vcf]
              

  • Need Info About Document Management System

    Hi All,
    I need information about Document Management system.
    How it is linked with KM
    Thanks
    Arun

    Hi Arun,
    DMS is available in R/3 Systems as a individual module and can be linked with KM using DMS Connector for  KM.  Find the links below..
    Check this out...
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/30/08a037b9e62417e10000009b38f889/frameset.htm">DMS</a>
    <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=26682">Thread 1</a>
    <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=235959">Thread 2</a>
    Hope this helps.
    Regards,
    Venkat.

  • Need info about nvidia graphics card supported with premiere pro cs5

    Hi
    I need information about nvidia graphics card supported with premiere pro cs5
    If I have a computer(portable) with this video card or graphics card :
    nVIDIA® GeForce™ GTX  285M with 1GB DDR3 Video Memory available in Single or Dual (SLi) Configurations
    Microsoft® DirectX® 10 Compatible
    is it going to support MPE in premiere  pro cs5?
    Regards,
    Vinay

    To be clear:
    You asked about supported cards. Here is a list of supported cards. Others on this thread are telling you how to make an unsupported card function to some degree using a method that is not advocated by Adobe.

Maybe you are looking for

  • Error while deploying components in Websphere

    Hi am trying to configure LiveCycle 8 on Websphere App Server. I deployed the 3 EARS and initialized the database. But while deploying the components am getting an error. "Failed to connect to LiveCycle Service Container.LiveCycle Service container i

  • Unzip data received from web service?

    In my Apex 3.0.1 application I am trying to obtain data from a web service. The problem is that the returned data is first zipped and then encoded using base 64 coding. I can decode the data using the utl_encode package and if I download the result,

  • Is It Possible to Save a Soft-Proofed File?

    Let's assume that I have an image, foo.psd, open in PSCS4. I softproof the image for a particular paper and printer. When I hit Ctrl-Y, the image is shown in softproof mode, and the softproofing info is appended to the image name in the PSCS4 window.

  • Vista x64, PC Suite 6.84.10.3 & Blue Soleil Blueto...

    Under XP PCsuite supported the BlueSoleil Bluetooth Stack. I do not see this listed for support under Vista. Is there a way to get it working? I have * Vista x64 * PC Suite 6.84.10.3 * Blue Soleil Bluetooth 2.6.8 070517 * Nokia N80, v5 software I see

  • Export to SDHC

    I have an Sony EX3 and work for a station that broadcasts in SD. My workflow is to edit on FCP in HD, export back to the SxS card and play the stuff out of the camera using the SDI to downconvert to SD. I want to own a JVC GY-HM700 and wonder if it'd