JVM not exiting when program terminates

I am developing an application that uses Frames on a pocket PC. At some certain event, I call System.Exit to close my application. However, doing this does not shutdown the JVM. Is there a way to force the JVM to exit?

Are you using j9.exe or j9w.exe to run your code? j9.exe launches a console which does not exit until the user closes it, otherwise you wouldn't be able to see your stdout after your application terminated. j9w.exe does not launch the console window.

Similar Messages

  • Vba-m process does not end when program is exited

    If I run a game in VBA-M, and while running the game, I exit the program, the VBA-M process continues to run in the background. How do I fix this?

    Oh, interesting...
    I get this but only if I have the window manager tell it to quit. (i3wm) I then have to send a kill 9 to the process. It seems to not be properly responding to kill 15.
    VBA-M will exit properly if I use its own menu option or the ctrl+q shortcut.

  • SunStudio debugger session exits when program finished

    I'm running SunStudio 12 on a Ultra 25 with one or more projects opened.
    Usually the debugging session was still available when the program execution ended.
    Now, for some reason, the debugging session also exit when finishing the program.
    I have to start a new dbx session after that.
    A colleague of mine can debug the same executable,
    but his debugging session is still available when finishing program execution.
    I'm not aware of that I changed something.
    Also I couldn't find any option in SunStudio that I might set wrong.
    How do I come back to the previous behavior?
    Regards
    Peter

    To control this "feature" ....
    From the main menu choose Tools->Options
    Select the Miscellaneous category
    Turn Debugging Options
    Select the Session Startup panel.
    Check No for "Finish Debug Session When Program Exits.
    NOTE: This property is not available in SunStudio 12 FCS, but
    is available either in the later MultiLingual release and/or patches.
    (I.e. what you colleague has :-)

  • Program not exiting when dispose() used.

    pl see the code.
    I am unable exit the window if the new class Ex() is defined.
    No error displayed, while running the program. What is the mistake. If anyone see please inform. No compilation error and at runtime, if Exit button is pressed, the window is not getting closed. I want to use dispose() instead of System.exit(0).
    This is because, If I use System.exit(0), my menu program would also get disconnected.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    import java.io.*;
    class ts extends JFrame
    JPanel jpn1,jpn2,jpn3;
    JButton b1,b2,b3;
    JLabel jlh;
    JFrame fr;
    Container cp;
    Connection con = null;
    Choice ch1,ch2;
    public ts()
    final JFrame jf = new JFrame();
    JPanel jpn1 = new JPanel();
    jpn1.setLayout(null);
    jpn1.setBackground(Color.pink);
    jpn1.setPreferredSize(new Dimension(800,100));
    JPanel jpn2 = new JPanel(new GridLayout(0,1));
    jpn2.setPreferredSize(new Dimension(775,50));
    jpn2.setBackground(Color.cyan);
    jlh = new JLabel("Test Module",JLabel.CENTER);
    jlh.setFont(new Font("TimesRoman",Font.BOLD,25));
    jpn2.add(jlh);
    JPanel jpn3 = new JPanel();
    jpn3.setBackground(Color.yellow);
    jpn3.setPreferredSize(new Dimension(800,50));
    Container cp = jf.getContentPane();
    cp.add(jpn1,BorderLayout.WEST);
    cp.add(jpn2,BorderLayout.NORTH);
    cp.add(jpn3,BorderLayout.SOUTH);
    JButton b1 = new JButton("Get Details");
    b1.setBounds(150,450,100,20);
    jpn1.add(b1);
    JButton b2 = new JButton("Update");
    b2.setBounds(300,450,100,20);
    jpn1.add(b2);
    JButton b3 = new JButton("Exit");
    b3.setBounds(450,450,100,20);
    jpn1.add(b3);
    b3.addActionListener(new Ex());
    /* b3.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    jf.dispose();
    return;
    //System.exit(0);
    jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    jf.setSize(800,700);
    jf.setVisible(true);
    //jf.pack();
    jf.show();
    class Ex implements ActionListener
    public void actionPerformed(ActionEvent evt)
    if(evt.getSource() == b3)
    dispose();
    return;
    public static void main(String[] args)
    new ts();
    }

    Your class both extends JFrame and instantiates a (separate, totally different!) JFrame. You are disposing the wrong JFrame -- and there shouldn't be two anyhow.
    Since you are not modifying any default behavior of JFrame, your class has no reason to subclass JFrame. Always prefer composition over inheritance.
    In future (not this time), Swing questions should be posted in the [Swing forum|http://forums.sun.com/forum.jspa?forumID=57]
    db
    edit And go through the [Swing Tutorial|http://java.sun.com/docs/books/tutorial/uiswing/index.html] which will (hopefully) raise your level of competence. You need more inputs than a forum can provide.
    Edited by: Darryl.Burke

  • JVM not found when trying to install NetBeans

    Hi all,
    I'm a new SUN Certified Java Programmer and I would like to use NetBeans IDE. j2sdk1.4.1_01 seems to be correctly installed on my system (Windows XP Home Edition) (I can see the little Java animation on the download section of this site) and when I run the NetBeans installer I got a message that says "no corresponding JVM found" :'(
    My Java teacher has told me to create a JAVA_HOME variable in the system environnement variables and to give it the value "D:\j2sdk1.4.1_01" (Windows XP and sdk are installed on D:\). I've done it but... nothing!
    Does anyone have a little idea on how to solve this problem???
    Thanks
    JadB

    Actually, I think the phrase "No JVM found" means the JRE environment has not been setup properly. Most suspicious point is that Tomcat 4/5 doesn't recognise the location of JRE on some Windows platforms. Default location of JRE is C:\program files\java\... and you should notice that there is space in the path which may not be acceptable by some install wizards. You are recommended download a separated copy of JRE and install it on a recognised path, such as C:\J2RE\ . Remember, you should uninstall the previous copy of JRE cobundled with J2SE package before taking any action.

  • Quantum TV - Skip Ahead does not work when program still recording or when time shifting

    I've always used skip ahead (set to 30 secs) to jump over commercials etc.  Since "upgrading" to Quantum, the skip ahead button does not always work.  I've narrowed the problem down to when the show you're watching is still airing (i.e. not  done recording).  The skip ahead function seems to work for a while until you reach a certain point in the program, then instead of skipping ahead, it jumps back to some earlier spot in the program.  When this problem occurs, this earlier spot is always the same spot.  To get around this bug you have to remember not to use the skip ahead button (easier said than done) or you're forced to fast forward back to the spot you  left off.  So once the problem starts you have to use the Fast Forward button to skip ahead.
    Is this a known issue?  Is a fix in the works?  Very frustrating indeed.
    Other gripes I have are  covered in other posts...such as the laggy remote controls.
    Thanks
    Solved!
    Go to Solution.

    People have reported that the skip issue is fixed in the latest level of the Verizon code sent out on 9/11, and Verizon has also said it is fixed. Are you sure you still have the problem? If so, I suggest you check to see if you have the latest software:
    Release: 1.0b
    Build Number: 02.18.2
    User Interface Version: 02.18.1
    Middleware Version: 02.18
    Firmware Version: KA12.37.03.04Alder.408758
    I have not experienced the skip problem on the new software level, but I have only done the skipping once on a program still recording so that is probably not a good test.
    I also do not really see any laggy response very often. Yes at times the box seems to just stop and take a deep breath or something for a couple of seconds, but overall the responses to commands from the remote have been getting better with each software upgrade (I have had 6 software upgrades I think since I got Quantum TV in early April). And I know Verizon has been working to improve the performance. Question: have you turned off the box and pulled the power plug for 15-20 seconds, then reconnected the power and let the box reinitialize? Some people have reported that doing that improves the remote performance (I have not had to do that).
    At this point I really do not have any issues with Quantum TV at all, but then again I have a pretty simple setup, no sound system for example, and I never use any Widgets or VOD, which some people complain about. I have my setup to watch TV, and record programs to watch later, the rest of the functionality is really of little or no interest to me.
    Justin
    FiOS TV: Extreme HD, Internet: 50/50, Digital Voice
    VMS Enhanced Service: 1 server, 2 clients
    Keller, TX 76248 (VHO 1)

  • Will not exit when logout button/tab highlighted

    When trying to exit webmail site amongst others, clicking on the logout tab/button does not get a response

    Have no idea what to do or try

  • StageWebView MP4 not exiting when I tap "done"?

    I am calling a StageWebView to play an MP4 video in my Flash Air for iOS project. The video plays great, but when I tap done, it does not remove the video from the stage to let me go back to the application. Am I missing some additional code? Thanks.

    If you have the stagewebview filling the stage, then you won't be able to get a touch from the user to then set the stagewebview to null. If it has to be full screen video, then you may need to use timers to know when the video has finished playing. If it can initially be not full screen, say a thumbnail sized version which has your Flash navigation showing underneath it, then if the user plays the view, zooms to full screen, and then touches Done, your Flash interface will reappear, and you will be able to proceed (setting the stagewebview to null if you've finished with it).

  • Withholding taxes not updated when program run in background

    Hi,
    in a z1 report i do:
      SUBMIT z2
      VIA JOB lc_jobname
       NUMBER v_jobcount
         WITH p_fecha  = p_fecha                               
         WITH p_file   = v_file_in
         WITH p_e_file = p_efile 
         WITH p_client = p_client
         WITH p_test   = p_test  
          AND RETURN.
    within this z2 report i do:
              PERFORM mrm_invoice_create_call(saplmrm_bapi)     USING     s_rbkpv
                                                           tab_frseg[]
                                                           tab_co[]
                                                           tab_ma[]
                                                           c_rbstat_posted
                                                           space
                                                 CHANGING  invoicedocnumber
                                                           fiscalyear
                                                           return[]
                                                           f_subrc.
              IF test IS INITIAL.
                COMMIT WORK AND WAIT.
              ELSE.
                ROLLBACK WORK.
              ENDIF.
    the question is that if i run z1 report online there is no problem but if
    i run z1 report in background, withholding taxes are not calculated.
    After debugging this is what i´ve found out:
    1.- in PERFORM mrm_invoice_create_call(saplmrm_bapi) there is a call to fm FI_WT_POST IN UPDATE TASK
    2.- in FI_WT_POST table WITH_ITEM is updated
    i guess this could be due to a delay in updating the table so i´m considering doing a WAIT UP TO X SECONDS.
    why is it working in online mode but not in background mode?
    any idea?
    Best regards.

    Hi,
    in case someone is interested this is how i solved the question:
    i had badi MRM_WT_SPLIT_UPDAT implemented.
    in this badi implementation i had this code (among other checks too):
    CHECK sy-tcode = 'MIR4' OR sy-tcode = 'MIR7'.
    this code avoided the background job case.
    It seems that In a background job sy-tcode is empty.
    so i just needed to add this:
    CHECK sy-tcode = 'MIR4' OR sy-tcode = 'MIR7' OR  sy-batch = 'X'.
    and then withholding taxes reappeared again.
    (so sad, so true... one day of debugging,  sigh)
    Best regards.
    Edited by: Pablo Casamayor on Feb 2, 2012 4:53 PM

  • The button on my Ipod Touch (the big one just below the screen) will not work when I press it. Nothing happens, when before it would wake my IPod out of sleep mode, and exit out of programs I was using. Now, no reactions. What should I do?

    The button on my Ipod Touch (the big one just below the screen) will not work when I press it. Nothing happens, when before it would wake my IPod out of sleep mode, and exit out of programs I was using (ex. ITunes or Safari to main screen) . Now, no reactions. When I press the button, it appears to be more indented then it was before. What should I do? Do I need to get it fixed or replaced, or is this a problem I can fix on my own? Whatever it is, I really need some advice. Thanks in advance.

    Try:
    fix for Home button
    iPhone Home Button Not Working or Unresponsive? Try This Fix
    - If you have iOS 5 and later you can turn on Assistive Touch it add the Home and other buttons to the iPods screen. Settings>General>Accessibility>Assistive Touch
    - If not under warranty Apple will exchange your iPod for a refurbished one for:
    Apple - Support - iPod - Repair pricing
    You can do it an an Apple store by:
    Apple Retail Store - Genius Bar
    or sent it in to Apple. See:
    Apple - Support - iPod - Service FAQ
    - There are third-party places like the following that will repair the Home button. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • Program won't exit when reading in gif?!?

    Hi,
    I have written a class (see code below) that has a single method to read in two gifs, superimpose them, add text and then write the result to a jpeg file.
    I test this in a simple main method (again see below). javac test.java, java test
    The problem is that the program will not terminate. The final System.out.println() command is displayed in the terminal. It has to be halted with ctrl+c.
    I have traced the problem to the image being read in! If I comment out the images being read in - in the MapMaker constructor (also commenting out where the images are used) - the program terminates correctly.
    There are no exceptions flying around either!
    Any ideas? I guess some system resource isn't being cleared, but don't know how to do this!
    I can't use System.exit() because this class will be used in a .jsp page that will use the jpeg created!
    Thanks in advance
    Matt
    MapMaker.java:
    import java.awt.*;
    import java.awt.event.*;
    import com.sun.image.codec.jpeg.*;
    import java.awt.image.BufferedImage;
    import java.awt.image.DataBuffer;
    import java.awt.geom.AffineTransform;
    import java.io.*;
    import javax.swing.*;
    import java.awt.MediaTracker;
    import java.awt.Canvas;
    public class MapMaker extends Canvas implements java.io.Serializable{
    private Image arrow;
    // Read in the 2 .gif files of the arrow and the map
    public MapMaker() {
    // When commenting out these lines, the program works fine
    arrow = Toolkit.getDefaultToolkit().getImage ("arrow2.gif");
    try {
    MediaTracker tracker = new MediaTracker(this);
    tracker.addImage(arrow, 0);
    tracker.waitForID(0);
    } catch (InterruptedException e) {
    System.out.println("Interrupted exception caught ");
    e.printStackTrace();
    // createMap generates a .jpg file fo the map with an
    // arrow and wind direction
    public void createMap() {
    // Create a new Buffered image and associated Graphics 2D object
    // Draw to the Graphics 2D object
    BufferedImage bi = new BufferedImage(200,200,BufferedImage.TYPE_INT_RGB);
    Graphics2D big = bi.createGraphics();
    // Set the rendering hints
    big.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    big.setRenderingHint(RenderingHints.KEY_RENDERING,
    RenderingHints.VALUE_RENDER_QUALITY);
    big.setBackground(Color.white);
    big.clearRect(0, 0, 200, 200);
    // Here I would add the images to big
    // Add text
    big.setFont(new Font("Dialog", Font.BOLD, 12));
    big.setColor(Color.green);
    big.drawString("12", 138, 128);
    try {
    // write the buffered image to a jpg file
    File file = new File("test.jpg");
    FileOutputStream out = new FileOutputStream(file);
         // encodes bi as a JPEG data stream
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
    param.setQuality(1.0f, false);
    encoder.setJPEGEncodeParam(param);
    encoder.encode(bi);
    out.close();
    } catch (Exception ex) {
    System.out.println("Failure to write JPEG file");
    return;
    } // createMap
    // This tests the above class
    import MapMaker;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.math.BigDecimal;
    public class test {
    public static final void main( String args[] ) {
    try{
    System.out.println("Making new MapMaker object");
    MapMaker mapMaker = new MapMaker();
    System.out.println("Making new map");
    mapMaker.createMap();
    System.out.println("Finished making the new map");
    catch (Exception e){
    System.out.println("Top level exceptions\n");
    e.printStackTrace();
    System.out.println("All the way");
    return;
    }

    If anyones interested. It turns out that this is a feature!
    When windows resources (i.e. reading in an image) are used. Java programs won't exit automatically.
    They have to be closed with System.exit()

  • After sorting photos into albums, the albums disappeared on me. I dragged and dropped the photos and went back to check that they were in place before exiting the program. When I went back, the folder was there but no albums. Help!

    Working on an IMac - with IPhoto v.9.6 
    This is my first experience with IPhoto... trying to move files from a PC over to a Mac.
    I don't have a ton of photos but I created about 6 albums - standard albums - and dragged and dropped individual photos into each of the albums. I named each of the albums as well so I would know what was in each. After i was finished, I created a folder called 2014 and moved each of the albums into that folder. Before moving ANY of the albums, I opened each of them up to make sure that all the photos I wanted in each were indeed there - and since there were some errors on my part, I deleted any duplicates first. SO, I KNOW the photos were actually in each of the albums BEFORE i moved them into the 2014 folder.
    My intention was to then delete the photo files in my document file but once I got there I thought I would go back and double check the IPhoto file just to make sure... and the pictures were NOT in the albums where I had placed them... is there a need to save this before you move on and if so, to where and how? I was under the impression that once files were moved to albums, they remain there.
    The photos are still in the photo library but unsorted now again... I cannot even open the 2014 folder at this point.
    Thanks for any help!!

    Was back on IPhoto this morning. The folder did not open at all so I deleted it. Beside Albums, nothing showed at all. It was like I had done no work at all except to import my photo folder. Nothing was in my trash bin either.
    I started again and created one album at a time. I dragged and dropped photos into the album and exited out of IPhoto, opened up other programs and then returned to IPhoto to see if the album was still there and it was this time. I created a second album and did the same thing. This time, for some reason, the albums seem to be staying in place. I am not doing anything differently than last time. After creating three albums, I created a folder called 2014 and dragged and dropped the three albums into the folder and exited IPhoto. They were still there when I returned - YEAH! It seems to be working - for now! I am keeping my fingers crossed that my photos are not going to disappear but I am not going to delete my photo folder from my files just in case!
    Thanks for the suggestions but this may just have been a funny glitch... not sure what happened. I didn't change anything or do anything differently this time except that I am doing it one album at a time and exiting the program between creating each of them and coming back to check... very strange.

  • JSObject programming was not working when compiled in JSDK1.4.2_06

    JSObject programming was not working when compiled in JSDK1.4.2_06.
    But problem solved when i compiled with JSDK1.3.1_15 and tested with JVM 1.3.1_15.
    Still I could not run the class file generated in JSDK1.3.1_15 in JVM 1.4.2_06.
    What do you think happened across the SDK versions? Shouldn't the JSObject
    and other classes be part of the browser JVM.
    I want to know whether JSObject supports in JSDK1.4.2_06.
    It goes into the loop. It neither say error nor execute.

    Do not spam the site by posting to 4 forums

  • Error: could not open `C:\Program Files\Java\j2re1.4.0_01\lib\i386\jvm.cfg'

    I am geting this error when I enter the "java" command:
    "Error: could not open `C:\Program Files\Java\j2re1.4.0_01\lib\i386\jvm.cfg'"
    I have configured the PATH variable (Windows 2000) and "javac" works. I cannot, however, get my programs to run because of the error every time I type "java". Also, I did not install my JDK / SDK to the directory in which the computer is looking for the "java" cammand (ie. it is not in 'Program Files'...). If anyone can help, it would be greatly appreciated. Thank you.

    Try using the -cp switch on the command line. For example:java -cp . MyProgramIf this corrects the problem, you need to set the classpath variable
    as well as the path.
    Mark

  • JFXPanel can cause the program to not exit

    This is a separate issue that came to light in another discussion: [url http://forums.oracle.com/forums/thread.jspa?threadID=2236566]Image conversion between AWT and FX
    I've concluded that the culprit is the JFXPanel. Hopefully this will be sorted out by the final release. The minimum code required to reproduce the problem is:import javafx.application.Application;
    import javafx.embed.swing.JFXPanel;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.stage.Stage;
    public class JFXPanelHang extends Application {
      public static void main(String[] args) {
        Application.launch(JFXPanelHang.class, args);
      @Override
      public void start(Stage primaryStage) throws Exception {
        JFXPanel panel = new JFXPanel();
        panel.setScene(new Scene(new Group()));
        primaryStage.setVisible(true);
    }The program doesn't terminate when the <tt>Stage</tt> is closed. If however you comment out the <tt>setScene(...)</tt> line, the program terminates normally.
    I wanted to log an issue on Jira, but I'm getting an error:
    JIRA Startup Failed
    You cannot access JIRA at present. Look at the table below to identify the reasonsIf anybody can reach the bug reporting page, please do report it. Thanks.
    db

    Hi,
    If this helps you somehow
    here is what i got when listing Threads :
    when line setScene... is not commented
    java.lang.ThreadGroup[name=main,maxpri=10]
        Thread[main,5,main]
        Thread[JavaFX-Launcher,5,main]
        Thread[QuantumRenderer-0,5,main]
        Thread[JavaFX Application Thread,5,main]
        Thread[Thread-2,5,main]
        Thread[AWT-Shutdown,5,main]
        Thread[AWT-Windows,6,main]
        Thread[AWT-EventQueue-0,6,main]
        Thread[Disposer,10,main]and when it is commented
    java.lang.ThreadGroup[name=main,maxpri=10]
        Thread[main,5,main]
        Thread[JavaFX-Launcher,5,main]
        Thread[QuantumRenderer-0,5,main]
        Thread[JavaFX Application Thread,5,main]
        Thread[Thread-2,5,main]
        Thread[Disposer,10,main]same output like in another discussion.
    Difference is:
    Thread[AWT-Shutdown,5,main]
    Thread[AWT-Windows,6,main]
    Thread[AWT-EventQueue-0,6,main]
    When i close stage those 3 are still running.

Maybe you are looking for

  • How to create checkboxes in BIP templates?

    I am creating BI Publisher Template for use with Siebel. In the datastream, values for boolean fields are passed as Y or N. However if I place a MS Word checkbox object and give the field as the property, nothing happens at all. I have tried using co

  • How to get automatically sysdate in a field

    How to get sysdate automatically in a field in ADF

  • How to validate an XML file in BPEL ?

    Hi All, I have 2 Bpel processes. One for creating supplier and one for formate Validations. I am having problems with formate Validations. I am trying to validate an xml file that is passed to my Bpel Process (SupplierValidation). My process contains

  • In which table may I find the settled values from the WO's settlement

    Hello Expert, Can anyone be so kind an let me know In which table may I find  the value of settled costs from Work Order broken donwn into Settlement Receivers? I have found the table COBRB where I'm able to see the settlement rules for the WO but wh

  • Inserting learning interactions

    This question was posted in response to the following article: http://help.adobe.com/en_US/presenter/using/WS352104faaae911e5537ec967137bceb03e5-8000.htm l