�How can i make my program not to shutdown after using wsimport on runtime?

I have this code:
// More code before this one
WsImport ws = new WsImport();
String[] s = new String[3];
s[0] = "-d";
s[1] = "wsdl";
s[2] = URL;
try {       
    ws.main(s);
} catch (java.lang.Throwable e) {
// More code after this onewhen ws.main(s) finish its job it forces my program to shutdown too ='(
How can i fix that?
Any help will be really appreaciated.

kevjava wrote:
jschell wrote:
[...] run it in another app and interact with it from your main app.As shown in the example here:
[http://www.java2s.com/Code/JavaAPI/java.lang/ProcesswaitFor.htm|http://www.java2s.com/Code/JavaAPI/java.lang/ProcesswaitFor.htm]
If the other application's main() method is calling System.exit(), this is the only semi-sane way that i know of to get around it.thanks, it worked:)

Similar Messages

  • How can I make a file not read only? Using LV6.0, I have tried the Access Rights VI w/o luck.

    I am talking about any file in windows 98 that has the read only box checked when I look at the properties of the file from Windows Explorer. I can can get rid of the check from the properties box, but I want to do it programmaticaly in LabView.

    Hi,
    Wire in '448' to the 'New Permissions' of the Access Rights VI. This will set the file as readable, writable and executable. I just tried this (on WinNT, though).
    The 'permissions' parameter is a 16-bit integer where the least 9 bits are used. Of these, for Windows, bits 8, 9, and 10 (0-indexed) are important (i.e. if these are set = integer 448). See online Help for full details.
    Hope this helps,
    Khalid

  • How can I make my program Run forever?

    I would like to know how can I make my program execute some method while the GUI still open. I have something like this.
      public static void main(String args[]) {
        System.out.println("****************************");
        System.out.println("    PACKET READER CONSOLE   ");
        System.out.println("****************************");
        IPDetector window = new IPDetector(); // IPDetector is the JFrame
        window.setTitle("IPDetector Analyzer");
        window.pack();
        window.show();
        PortListener pl = new PortListener();// Is my portlistener class
        PacketReader c = new PacketReader();
        while(JFrame still open){// I dont know how to put a statemente here
          pl.start();// this method reads from a port and returns a string
          String cc = pl.data;// gets the string from the port listener
          while(!cc.equals("")){
            c.portWriter(cc);// writes the string into a file
      }I want that my portlistener keeps reading all the time, and if is something in the socket information.
    Should I use a thread? Any ideas? thanks.
    Chris

    I still not understanding how to make it thread. My main class is this one IPDetector. and it looks like this.
    public class IPDetector extends JFrame {
      // Declaration of the instance variables
      private static ArrayofDisplay  ad = new ArrayofDisplay();
      private ArrayofCreators database = new ArrayofCreators();
      JLabel sourceLabel;//etc..
      public IPDetector() {
        IPDetectorLayout customLayout = new IPDetectorLayout();
        getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
        getContentPane().setLayout(customLayout);
        sourceLabel = new JLabel("Source IP Add.");
        getContentPane().add(sourceLabel); 
        addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
      // I get confused here...
      private boolean alive; // Do I need to declared here?
      public void setAlive(boolean val) { // This one also?
        alive = val;
      // IPDetector Methods...
      public void displayCaller(ArrayofDisplay aD){  }
      public void setAndReplace(String text)  {    }
      public void refresh(){ }
      public boolean action(Event evt, Object arg){ }
      //etc...
      public static void main(String args[]) {
        System.out.println("***********************************************");
        IPDetector window = new IPDetector();
        window.setTitle("IPDetector");
        window.pack();
        window.show();
        PortListener pl = new PortListener();
        PacketReader c = new PacketReader();
        while (alive) {// Is this correct here?
          pl.start();
          String cc = pl.data;
          while(!cc.equals("")){
            c.portWriter(cc);
            window.refresh();
            cc = "";
    class IPDetectorLayout implements LayoutManager {
      public IPDetectorLayout() {  }
      public void addLayoutComponent(String name, Component comp) {  }
      public void layoutContainer(Container parent) {  }
    }

  • On my Mac desktop I must have changed a setting so that now when I move the mouse the open windows fly off to the sides and I can't see them. They come back when I move the mouse, but it is so annoying. How can I make the windows not disappear like that?

    On my Mac desktop I must have changed a setting so that now when I move the mouse the open windows fly off to the sides and I can't see them. They come back when I move the mouse, but it is so annoying. How can I make the windows not disappear like that?

    Click on the Hot Corners..  button and look at the four definitions.  In the picture below, if you moved the cursor to the right top of the screen, it would slide all the applications off the screen as you describe and show the desktop.  Set it to "-" to deactivate.

  • How can i make my keyboard not to appear on my i pad, how can i make my keyboard not to appear on my i pad

    how can i make my keyboard not to appear on my i pad, how can i make my keyboard not to appear on my i pad? couse i want to play a game and is coming on the screen is really iritating ..

    You cannot have the keyboard gone altogether, because it has to come up when an app needs input. The best way to do what you want to do is make sure that no apps are running when you are to go gaming: double click the Home button, swipe up all pages that show (not the app icon but the app page). then start the gaming. It it then still comes up, you look at what app is asking for it and set push notifiactions and autotarting off for that app in the settings.

  • How can i make simple program to match colors ?(photos taken by camera)

    how can i make simple program to match colors ?(photos taken by camera)

    Hi khaledyr,
    use a "random number" and compare for ">0.5" to get a (1 or 0) signal
    What exactly are you searching for?
    - Hints for choosing hardware?
    - How to output voltage or relais signals?
    - Help on using DAQ(mx)?
    - Help on generating (boolean) waveforms?
    Message Edited by GerdW on 04-16-2010 08:15 AM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can I make my Kerio WebMail memorize email addresses used previously?

    How can I make my Kerio WebMail memorize email addresses used in the past?

    Have you checked with Kerio support for answers? <br />
    http://support.kerio.com/index.php?_m=knowledgebase&_a=view

  • How can I make the status bar hide automatically when using safari?

    How can I make the status bar hide automatically when using safari?

    When Safari is in FullScreen mode, menu bar will be hidden.
    Safari window to fit the screen?
    Move the mouse pointer to the bottom right corner of the Safari window.
    Double arrows will appear. Drag it to resize the window to fit the screen.

  • How can I make a photo book of 125 pages using I-Photo??

    How can I make a photo book of 125 pages using I-Photo?

    You can't.  There's a 100 page (50 pages both sides) limit.
    OT

  • How can I make an exact copy of a dvd using os lion on a macbookpro

    How can I make an exact copy of a dvd using os lion on a macbookpro....

    Exactly what is on this DVD?
    Allan

  • How can I get WebAS to not start-up after restarting Windows?

    I would like to not have my WebAS auto start after I reboot windows.
    I found of couple of options in Configuration tool but they did not stop it.
    We have a firewall product that I cannot disable (per security policy), but I can terminate it once I get the desktop.  However by that time WebAS has started and encounters blocks from firewall, and once this happens, half the time it causes my jcontrol.exe to result in NIETIMEOUT messages and once THAT happens I have to uninstall and reinstall EVERYTHING. 
    So, how can I configure WebAS to not automatically start-up after rebooting windows?  I have searched help.sap.com and looked for options in Visual Admin and Configure tools.

    Easier than it seems
    Go to Administrative Tools/ Services in Windows.
    Change Startup type of the services to Manual.
    You can just sort by the 'Log On As' Column
    ".\SAPServiceJ2E"
    or whatever you instance name is. You can always start the service from the MMC console after this.

  • How can i make a still frame from imovie 11 using mpeg streamline clip

    How can I make a still frame from iMovie using mpeg stream clip?

    See my User Tip here.
    https://discussions.apple.com/docs/DOC-3231

  • How can I make my pages a smaller size after completing my work?

    I have finished making some newspaper styled pages, however they are too big (due to poor calculations). How can I make  my pages  smaller, or to be the size I want?
    Thanks!

    As DOD and Peter have suggested, Layout Adjustment is probably the way to go. You will have to do some manual adjustments, but this tool can help save you some time.
    If you are using CS5 or earlier this explains the process:
    For CS6 you can use the Liquid Layout menu to do this:

  • How can I make .PDF files not display inline in an Outgoing mail?

    I want Mail to NOT display PDF files in outgoing messages. It will keep the icon placeholder if it's more than two pages, but not for one page PDFs. How can I stop this? It makes formatting kind of difficult.
    Thanks

    I knew. But I'm hoping for a way to make this the global default since ages...

  • How can i make a JTextField not scroll

    i have a JTextField which can show 10 columns, while i setText 20 cols, but i do not want the TextField scroll to show it all, any idea? thx

    Setting the columns on a JTextField is only used so Swing knows how big to paint the JTextField. It you want to limit the number of characters that can be contained in the JTextField, then you should use a Custom Document. The Swing tutorial on "Using Text Components" will explain more about Custom Document and give you and example document that limits entry to 300 characters:
    http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html

Maybe you are looking for

  • Setting up mail services. Name of server needs to be changed?

    I setup my xserve with snow leopard. By default it was named server.ourcompanyname.private. Here is my problem Im trying to host our company web site along with mail services. Need to bring all this in-house. I have with my web provider 5 dedicated I

  • Building secondary Index fails for large number(25,000,000) of records

    I am inserting 25,000,000 records of the type: Key --> Data [long,String,long] --> [{long,long}, {String}} using setSecondaryBulkLoad(true) and then build two Secondary indexes on {long,long} and {String} of the data portion.      private void buildS

  • How to configure take one get one free offer scenario

    Hello Experts I am quite new to the field of SAP B1 I am stuck at one case scenario, please help i)     Make sales with take one get one free offer (Eg: With purchase 1 paste same item offered free) ii)     In Sales document both the item should be d

  • Aperture library resides in external HD

    My main Aperture library is not present in my Mac when I disconnect it from the external HD. This is troublesome when I travel without the external HD. How can I establish my main library in the Mac?

  • Can I answer this inqury using minus or not in statement?

    Hi everyone, I'm trying to solve a inquery, here's the ERP [http://www.flickr.com/photos/78615233@N04/7201804950/] and here's the relational schema CRUISE CRUISEID CHAR (6 BYTE) * CRUISE_DEPT DATE * CRUISE_RETURN DATE * CRUISE_PAY NUMBER (6,2) * CRUI