All windows are closed automatically

Hi,
I installed JDK 1.7.0, I created a custom java application I compiled with apache-ant-1.8.1 and when i run de application the main window are closed after 5 seconds without any user interaction. I think this is a bug of JDK release or some licensing requirements? Anyone know something about this?
the command:
java -version
show:
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b112)
Java HotSpot(TM) Client VM (build 20.0-b01, mixed mode, sharing)
My:
JAVA_HOME=C:\Program Files\Java\jdk1.7.0
PATH=...;C:\Program Files\Java\jdk1.7.0\bin;C:\Program Files\Java\jdk1.7.0\jre\bin;...
Thanks,
Fadel

kevin,
you're right, I made a small application with JPanel, JFrame and JLabel and is not closed.
The code is this:
package oata;
import java.awt.*;
import javax.swing.*;
public class Ejemplo extends JPanel {
     public static void main (String [] args) {
          JFrame frame = new JFrame ("Ejemplo");
          JLabel jl = new JLabel("Ejemplo JLabel");
          frame.getContentPane().add(jl);
          frame.setSize(180,80);
          frame.setVisible(true);
But that can be then closes the window in my previous project?

Similar Messages

  • Firefox 5.0 won't open a new window if all windows are closed or minimized

    Running Firefox 5.0 under Mac OS X 10.6.8. If I close all of the windows, or all windows are minimized, I can't open a new window. A new window is listed in the Windows menu with the name "Mozilla Firefox", but the window does not actually exist. The ghost window can't be selected from that menu and therefore also can't be closed

    Well, the behavior I described is now intermittent. Sometimes I can open a new window and sometimes I can't. If I can't, command-Tab does nothing. So far I've found no consistent circumstances under which I can or can't open a new window.
    Originally I was running computationally intensive program that required 3.35 days to complete its run. When the run was over the Firefox problem disappeared - for awhile. Then the problem recurred in the intermittent fashion I've described.

  • How come my program doesn't shut down when all windows are closed?

    As of Java 1.5 (maybe earlier) java is supposed to exit when all windows have been closed. I have confirmed that this happens in a simple case of displaying 2 JFrames and closing both. Can anyone tell me why it's not happening in the case of 2 frames and 1 dialog here?
    * Created on Jul 12, 2006 by @author Tom Jacobs
    package tjacobs.ui;
    import java.awt.Component;
    import java.awt.Dialog;
    import java.awt.Frame;
    import java.awt.GraphicsConfiguration;
    import java.awt.HeadlessException;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ComponentEvent;
    import java.awt.event.ComponentListener;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    public class ModalOnParentDialog extends JDialog implements ComponentListener,
              WindowListener {
         private Component mOwner;
         private boolean mParentOnly = false;
         public ModalOnParentDialog() throws HeadlessException {
              super();
              init(null);
         public ModalOnParentDialog(Frame arg0) throws HeadlessException {
              super(arg0);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, boolean arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1, boolean arg2)
                   throws HeadlessException {
              super(arg0, arg1, arg2);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1, boolean arg2,
                   GraphicsConfiguration arg3) {
              super(arg0, arg1, arg2, arg3);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0) throws HeadlessException {
              super(arg0);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, boolean arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1, boolean arg2)
                   throws HeadlessException {
              super(arg0, arg1, arg2);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1, boolean arg2,
                   GraphicsConfiguration arg3) throws HeadlessException {
              super(arg0, arg1, arg2, arg3);
              init(arg0);
         private void init(Component c) {
              mOwner = c;
              addComponentListener(this);
              addWindowListener(this);
         public void componentResized(ComponentEvent arg0) {}
         public void componentMoved(ComponentEvent arg0) {}
         public void componentShown(ComponentEvent arg0) {
              doModalOp();
         public void componentHidden(ComponentEvent arg0) {
              doModalOp();
         public boolean isParentOnly() {
              return mParentOnly;
         public void setParentOnly(boolean b) {
              mParentOnly = b;
         public void setModal(boolean b) {
              super.setModal(b);
              //mModal = b;
              doModalOp();
         private void doModalOp() {
              if (mOwner != null) {
                   mOwner.setEnabled(!super.isModal() || !isVisible());
         public boolean isModal() {
              return super.isModal() && !mParentOnly;
    //     public boolean isParentModel() {
    //          return mModal;
         public void windowOpened(WindowEvent arg0) {
              doModalOp();
         public void windowClosing(WindowEvent arg0) {}
         public void windowClosed(WindowEvent arg0) {
              doModalOp();
         public void windowIconified(WindowEvent arg0) {}
         public void windowDeiconified(WindowEvent arg0) {}
         public void windowActivated(WindowEvent arg0) {}
         public void windowDeactivated(WindowEvent arg0) {}
         protected void finalize() throws Throwable {
              super.finalize();
              removeComponentListener(this);
              removeWindowListener(this);
              mOwner = null;
         public static void main(String[] args) {
              JFrame jf1 = new JFrame("1"), jf2 = new JFrame("2");
              final ModalOnParentDialog d = new ModalOnParentDialog(jf1, "3");
              d.setModal(true);
              d.setParentOnly(true);
              JButton b = new JButton("Show");
              b.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        d.setVisible(!d.isVisible());
              jf1.setBounds(0,0,40,40);
              jf2.setBounds(40,40,40,40);
              jf2.add(b);
              d.setBounds(80,80,40,40);
              jf1.setVisible(true);
              jf2.setVisible(true);
              d.setVisible(true);
    }

    I fixed it
    * Created on Jul 12, 2006 by @author Tom Jacobs
    package tjacobs.ui;
    import java.awt.Component;
    import java.awt.Dialog;
    import java.awt.Frame;
    import java.awt.GraphicsConfiguration;
    import java.awt.HeadlessException;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ComponentEvent;
    import java.awt.event.ComponentListener;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    public class ModalOnParentDialog extends JDialog implements ComponentListener,
              WindowListener {
         private Component mOwner;
         private boolean mParentOnly = false;
         public ModalOnParentDialog() throws HeadlessException {
              super();
              init(null);
         public ModalOnParentDialog(Frame arg0) throws HeadlessException {
              super(arg0);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, boolean arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1, boolean arg2)
                   throws HeadlessException {
              super(arg0, arg1, arg2);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1, boolean arg2,
                   GraphicsConfiguration arg3) {
              super(arg0, arg1, arg2, arg3);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0) throws HeadlessException {
              super(arg0);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, boolean arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1, boolean arg2)
                   throws HeadlessException {
              super(arg0, arg1, arg2);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1, boolean arg2,
                   GraphicsConfiguration arg3) throws HeadlessException {
              super(arg0, arg1, arg2, arg3);
              init(arg0);
         private void init(Component c) {
              mOwner = c;
              addComponentListener(this);
              addWindowListener(this);
         public void componentResized(ComponentEvent arg0) {}
         public void componentMoved(ComponentEvent arg0) {}
         public void componentShown(ComponentEvent arg0) {
              doModalOp();
         public void componentHidden(ComponentEvent arg0) {
              doModalOp();
         public boolean isParentOnly() {
              return mParentOnly;
         public void setParentOnly(boolean b) {
              mParentOnly = b;
         public void setModal(boolean b) {
              super.setModal(b);
              //mModal = b;
              doModalOp();
         private void doModalOp() {
              if (mOwner != null) {
                   mOwner.setEnabled(!super.isModal() || !isVisible());
         public boolean isModal() {
              return super.isModal() && !mParentOnly;
    //     public boolean isParentModel() {
    //          return mModal;
         public void windowOpened(WindowEvent arg0) {
              doModalOp();
         public void dispose() {
              //setVisible(false);
              //doModalOp();
              if (mOwner != null) {
                   mOwner.setEnabled(true);
              removeComponentListener(this);
              removeWindowListener(this);
              super.dispose();
         public void pack() {
              super.pack();
              addListeners();
         private boolean addListeners() {
              WindowListener[] listeners = this.getWindowListeners();
              if (listeners != null) {
                   for (int i = 0; i < listeners.length; i++) {
                        if (listeners[i] == this) return false;
              addComponentListener(this);
              addWindowListener(this);
              return true;
         public void show() {
              super.show();
              addListeners();
         public void show(boolean b) {
              super.show(b);
              addListeners();
         public void windowClosing(WindowEvent arg0) {}
         public void windowClosed(WindowEvent arg0) {
              doModalOp();
         public void windowIconified(WindowEvent arg0) {}
         public void windowDeiconified(WindowEvent arg0) {}
         public void windowActivated(WindowEvent arg0) {}
         public void windowDeactivated(WindowEvent arg0) {}
         public static void main(String[] args) {
              JFrame jf1 = new JFrame("1"), jf2 = new JFrame("2");
              final ModalOnParentDialog d = new ModalOnParentDialog(jf1, "3");
              d.setModal(true);
              d.setParentOnly(true);
              JButton b = new JButton("Show");
              b.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        d.setVisible(!d.isVisible());
              jf1.setBounds(0,0,40,40);
              jf1.setDefaultCloseOperation(jf1.DISPOSE_ON_CLOSE);
              jf2.setDefaultCloseOperation(jf2.DISPOSE_ON_CLOSE);
              d.setDefaultCloseOperation(d.DISPOSE_ON_CLOSE);
              jf2.setBounds(40,40,40,40);
              jf2.add(b);
              d.setBounds(80,80,40,40);
              jf1.setVisible(true);
              jf2.setVisible(true);
              d.setVisible(true);
    }

  • How can you get CMD + L to open a new window, when all windows are closed?

    In Firefox 28 and earlier, you could hit Apple + L (CMD + L) when no FF windows were open, and it would pull up a blank page with the cursor blinking in the address bar.
    After installing FF 29, when you hit CMD + L (with no windows open) it just plays the system alert sound and does nothing.
    I want to be able to hit CMD + TAB to gain control of an idle Firefox, and then be able to hit CMD + L to gain control of a BLANK address bar.
    Every other version of Firefox I've ever used did this, so am I missing something here? Any ideas?
    Note: I realize that you can hit CMD + N to launch a new window and then CMD + L to select the text within the address bar. I'm not looking to re-train my habits within Firefox, but simply want that feature like it was in the previous 28 versions.

    Well, after an entire week without a word from Mozilla, I officially give up.
    I understand that new software will have bugs when it is released. I understand that the bugs are fixed in the order of greatest impact/priority. I also understand that my issue is not a bug, rather a feature that was inexplicably removed.
    A couple of things I cannot understand —
    Why would Mozilla remove '''ANY''' features from their software when they are touting this as the most customizable web browser ever? That is obviously not logical and will be to their detriment in the long run.
    Furthermore, if a person did get on here just to complain about this update, they were immediately met with a canned response from a moderator, which offered a few options to make Firefox '''LOOK''' like the previous version. That speaks volumes about this update and the developers' confidence in it. The person who gets on here with a legitimate problem asking why a feature was removed — they get '''NO''' response from a moderator. Again, this speaks volumes. I am not even asking for an immediate solution to this problem, just the acknowledgement that there is a problem. On top of that, especially in the development of software, the old adage particularly rings its truest — ''If it ain't broke, don't fix it.''
    Lastly, I think we can all agree that Firefox 29 is a blatant ripoff of Google Chrome. If I wanted Google Chrome, that is exactly what I would have downloaded. That pains me not only as a devout Firefox user for nearly 10 years, but especially as I have donated over $200 to the Mozilla Foundation in that time. In other words, I have financially supported the development of a software that has become absolutely indifferent to its users' needs, and moreover, they have now resorted to copying off of their neighbor.
    I have since rolled back versions — all the way to Netscape Navigator 9 — which seems to have just about as much functionality as the bungled mess that is Firefox 29.
    I genuinely appreciate all of the time and effort that goes in to creating open-source software, and I financially support the projects that I feel adhere to the open-source philosophy. That said, Mozilla.org seems to be straying away from this philosophy, to the point where, for me, it is simply time for a change.
    Thanks for the memories, Firefox!

  • I need to update Firefox, but it keeps saying that Firefox needs to be closed first (even though all windows are closed). I cannot install or remove Firefox files due to this problem.

    Firefox was unable to open google, and I saw there was an update for that problem, but I am unable to install the update (or any update for that matter) as well as removing Firefox. Every time I try to do so, I get a message that I must close Firefox first (even though there are no windows open). I checked applications to be sure, and it does not appear Firefox is running when this happens.

    Hi kshikuma. This happens to me sometimes, as well.
    To solve this issue, open the Windows Task Manager by hitting Ctrl+Alt+Del.
    Go to the "Processes" tab and see if a process named "firefox.exe" or "plugin-container.exe" is opened. Close any and all such processes by right-clicking them and selecting "End Process".

  • I'm trying to download Flash Player to my Macbook, and it keeps on stopping in the midst of downloading and saying "you need to quit safari" even though all of my Safari windows are closed, what do I do?

    Thanks for any help

    Cofeebean wrote:
    even though all of my Safari windows are closed, what do I do?
    Keep in mind that on the Mac, even if you close all windows of an application, the application itself may still be running with no windows open. If you have closed all Safari windows, look at the Dock to see if there is a glowing dot under the Safari icon. If there is a dot, Safari is still running, so click the Dock icon and then choose Safari/Quit Safari.
    As an alternative to looking for the dot under an application in the Dock, I often use the Command-Tab keyboard shortcut to display the Application Switcher so I can see which applications are still open.
    You don't have to open Activity Monitor to quit a program unless there really is no way to way to do it from the normal interface.
    The only applications that quit when you close the window are the ones that only have one window, like System Preferences.

  • My menu bar does not appear at the top of my homepage on a brand new 27" iMac only when i pull up an app. this does not allow me to shut down my mac when all apps are closed nor does it all me to use finder. any help would be awesome

    My menu bar does not appear at the top of my homepage on a brand new 27" iMac only when i pull up an app. this does not allow me to shut down my mac when all apps are closed nor does it all me to use finder. any help would be awesome

    Press the escape (esc) key to exit full-screen mode.

  • Bug Report : Upgraded to Firefox v10. Holding CTRL+ [F4] too long after all tabs are closed causes error. "Exc in ev handl: TypeError: this.oPlg.onTabClosed is not a function"

    Bug Report :
    Upgraded to Firefox v10. Holding CTRL+ [F4] too long after all tabs are closed causes error.
    "Exc in ev handl: TypeError: this.oPlg.onTabClosed is not a function"

    What extensions do you have? (Go to Firefox > Customize > Add-ons to see or Help > Troubleshooting info for a copy-pasteable list)

  • I have a 17 inch Mac book, after migrate to Lion, I take 25 seconds to shutdown. all progams are closed. any reason??   Need I to install a native Lion OS to solve the problem?   Regards,   José A. Pereira

    I have a 17 inch Mac book, after migrate to Lion, I take 25 seconds to shutdown. all progams are closed. any reason??
    Need I to install a native Lion OS to solve the problem?
    Regards,
    José A. Pereira

    Hi, Processor 2.66 Ghz Intel core i7, memory 8Gb 1067 Mhz DDR3.
    on shut down a White screen occur with a star flashing during more or less 25 seconds. before update to Lion, 3 or 4 seconds to shutdown. no more app installed or removed. it stills the same usage.
    I will be greatful if you can help me.
    Regards,
    José A. Pereira

  • My Phone Just Shuts Off and won't come back on unless hooked to a power source.  I've got all the updates and all apps are closed out.

    My Phone Just Shuts Off and won't come back on unless hooked to a power source.  I've got all the updates and all apps are closed out.

    Most likely a bad battery.

  • Installation of Flash stops after 30% complete, plugins and java are enabled in the browser and all browsers are closed.

    installation of Flash stops after 30% complete, plugins and java are enabled in the browser and all browsers are closed.

    Hi,
    I'm assuming you're machine is OS X (please include this in the future, avoids assumptions).  Are you using anti-virus software, if so, if you stop/exit the anti-virus software, does the installation proceed?
    If not, or if the installation still does not proceed after stopping the anti-virus software, please try the offline installer, posted at the bottom of the Installation problems | Flash Player | Macpage, in the 'Still having problems' section.
    Maria

  • I'm loosing too much battery life. All apps are closed.

    Hi,
    I'm loosing too much battery life and all apps are closed. Can you help?
    Thank you!

    Hello, mcnairkp. 
    Thank you for visiting Apple Support Communities.
    Battery life can be difficult to troubleshoot as multiple factors contribute to how long a charge can last.  Graphic intensive applications, display brightness and data connectivity are just a few of the items that can cause the battery life to decrease rapidly.  I would need to know a little more information about your usage patterns to give you and idea on how to maximize battery life.  However, here are some tips on how to adjust settings and charge the device that may help.
    iPhone and iPod touch: Charging the battery
    http://support.apple.com/kb/ht1476
    About Batteries
    About iPhone Batteries
    If you feel that you need assistance with the battery concern, you can always reach out to us via the link below.
    Contact Apple
    Cheers,
    Jason H.

  • FireFox, despite being in a separate window, which is suponque a separate instance, when leaving the menu "exit" All the windows are closed, why is that? It has some configuration that prevents this?

    open FireFox
    press [CTRL]+[N]
    (now are 2 Window of FireFox, ok?)
    click on Menu
    click exit
    Ops! All Window of FireFox are closed?

    bbatman wrote:
    jschell wrote:
    My guess is that someone was trying to protect the system properties and then they wanted to add on the top of that. Thus they came up with that idea.Yeah, I was thinking that too. I bet you are right.
    But Properties exposes no API to restore defaults to the current instance. If some key/value gets "overwritten" by a put in the current instance, shadowing a key/value in defaults, there is no way to bring the default value back to the foreground except by deleting key (and thus restoring visibility to defaults).Err...although true I doubt it is relevant.
    Consider.
    1. Something grabbed a property value before you did anything. Nothing you do will change that. I suspect most VM stuff works this way.
    2. Something grabbed the properties and kept a reference. Nothing you do will change that.
    3. You changed it, so why would you want the other value?
    4. Deleting it does restore it.
    Given the above what situation from that do you think is relevant to your question? Or is there some other situation that you are considering?

  • Installed arch64, all ports are closed?

    I installed arch64 a few days ago, and today while trying the bittorrent client transmission, i realized that all the ports are closed. I installed 32bit arch numerous times before and I remember being able to use torrents right away. Its not a problem with just transmission, it does it with every other torrent client too. Anyone know what the problem could be?

    wankel wrote:This is really weird, should I just try to reinstall arch?
    Naa... Not yet.
    Maybe transmission has different ports set for torrent traffic, so you could try changing the (Arch) ports to the ones Windows uses.
    EDIT: In transmission preferences, you can check whether the port is open and listening.
    Last edited by Runiq (2008-11-28 08:32:58)

  • Is it possible to keep Firefox open after all windows have closed (and to additionally open a new window when starting another Firefox process)?

    Yes, yes, I know, it's not good to keep applications open when they aren't designed to be. I'm sure Firefox has some memory leaks and this is doing more harm than good, but...
    My computer isn't the greatest out there, and to increase the usability of my Firefox browser it would be nice to keep the firefox.exe process open, even after closing all windows. I know Firefox doesn't totally close if there is at least one Firefox-related window open, but having to open X popup window seems a bit extreme to get this effect.
    Additionally, to allow another window to be opened, it would be cool for the "OH NO FIREFOX IS STILL OPEN" prompts to be replaced with just attempting to open a new window, if this feature is enabled.
    So, if it exists already, is there a config variable for it, and if it doesn't exist, is it possible to perform somehow? I'm not afraid to get my hands dirty if it comes to it; I'd really like to get this happening.
    I'm running Windows 7 Home, if it matters. (I'd rather be running another OS, but this is neither the time nor place...)

    LINK: https://addons.mozilla.org/en-US/firefox/addon/minimizetotray-revived/

Maybe you are looking for

  • How to Activate the Table which Doesn't Exist - Can I create Table in SE11

    Hi Gurus, I am a BASIS Person ..so, I don't have much idea about ABAP Developement side . But, while applying patches to one of  the SAP Component, I get the following error message ( usr\sap\trans\log ) : Phase Import_Proper >>> SAPAIBIIP7.BID 1 ED0

  • Disk too slow

    Hi there, I am running logic express 7.2 and tried to run some audio files yesterday. Unfortunatly i cannot run them as i am getting a disk too slow message popping up. I was trying to run 18 x 24bit x 96000hz files. This doesnt strike me as excessiv

  • Cannot run i Tunes

    When I try to run i tunes I get an error message " i tunes cannot run because some of its required files are missing. Please reinstall" However I can't reinstall or remove the existing programmes, i tunes or Quicktime for some reason. Equally when I

  • I have a "?" on my address book icon.

    I have a "?" on my address book icon and it won't open. I am syncing to mobile me. My iPhone and iPad contacts still are there. ideas?

  • I can't sign in to iCloud

    I received a new Macbook Air from my workplace. I'm trying to sign in to iCloud to import Contacts, Bookmarks, etc. When I try to sign in under System Preferences > iCloud or under System Preferences > Mail, Contacts, and Calendars, I get the same me