Process in memory after System.exit(0)

I still see the process in memory after I exit the app. Do you think it is a JWS side effect?
Platform: W2K
Cheers,
Ivan

Ivan,
when you enable the 'java console' in Java Web Start->Preferences->Advanced->Show Java Console, you'll notice that you run into a java.security.accessControlException.
To avoid that, sign your jar file(s) and add the following to your jnlp file :
<security>
<all-permissions>
</security>
and it will work as expected!
Regards,
Patrick

Similar Messages

  • Spawning another java process after System.exit(0);

    Hi everyone
    I have an application that Im trying to test. Unfortunately one of these tests requires me to spawn another java process after a System.exit(0); has executed. Since this exits the VM its proving very difficult. Does anyone know of a way to restart the VM after the System.exit has run?
    Thanks

    Hi everyone
    I have an application that Im trying to test.
    Unfortunately one of these tests requires me to spawn
    another java process after a System.exit(0); has
    executed. Since this exits the VM its proving very
    difficult. Does anyone know of a way to restart the VM
    after the System.exit has run?Exactly what do you want to do?
    If the application is supposed to only have one exit point then add a security manager and disallow all the other exit points. Then you can use Runtime.exec() to start the second application just before the real exit point.
    However note that if there are other calls to System.exit in the application then it is very likely that this will cause some unexpected failures in terms of security exceptions.
    You could also use Runtime.addShutdownHook() which would run your second app. The hook would be called as the application exits.
    You might want to consider what happens if someone just kills the application (say with 'kill -9' or the windows task manager.) In either of those cases there is nothing that you can do in java to make that second application run.
    You might also want to consider why you are doing this in the first place. As suggested a script solution is probably a better solution.

  • Keep external process alive after System.exit(0)

    I wish to start Outlook from my Java program and have my own program exit normally but keep alive the Outlook process. Besides, I am not interested in input/output/error streams.
    public class OutlookStarter {
         public static void main(String[] args) throws Exception {
              new ProcessBuilder("cmd", "/c",
                        "\"C:\\Program Files\\Microsoft Office\\Office14\\outlook.exe\"")
                        .start();
    }When I run this when Outlook is not started, my program will not exit until I close Outlook.
    I really do not want to close Outlook just to exit my program (my real program has a Swing GUI and users must be able to close it).
    Also when I run this when Outlook is already started, somehow my program DOES exit without closing the new Outlook window.
    EDIT: I can add System.exit(0) and behavior is the same. I can use Runtime.getRuntime().exec and behavior is the same.
    Edited by: Strider80 on Jan 12, 2011 7:27 AM

    Strider80 wrote:
    I wish to start Outlook from my Java program and have my own program exit normally but keep alive the Outlook process. Besides, I am not interested in input/output/error streams.
    public class OutlookStarter {
         public static void main(String[] args) throws Exception {
              new ProcessBuilder("cmd", "/c",
                        "\"C:\\Program Files\\Microsoft Office\\Office14\\outlook.exe\"")
                        .start();
    Did you try using [url http://www.computerhope.com/starthlp.htm]start ^[url http://www.computerhope.com/starthlp.htm]Microsoft DOS and command prompt^ ?
              new ProcessBuilder("cmd", "/c",
                        "start \"C:\\Program Files\\Microsoft Office\\Office14\\outlook.exe\"")
                        .start();

  • Why in COM, set smth true, stays true even after System.exit?

    I am using "Jacob" to do COM calls. When I alter the "ShowAll" property of Word.Application and I set it to true, it will then forever be true even if I exit the application AND quit the word application. If I set it to false, the same thing happens, it will always be so. The code to call/set this is:
    (NOTE: This uses classes I made to wrap the Dispatch calls)
    Word wordApp = new Word();
    Documents docs = wordApp.getDocuments();
    Document doc = docs.open("D:\\JavaProjects\\Test.doc");
    //GET VIEW
    View wordView = wordApp.getActiveWindow().getView();
    //PRINT THE VIEW PROPERTIES
    System.out.println("Show All: " + wordApp.getActiveWindow().getView().isShowAll());
    System.out.println("Show Paragraphs: " + wordApp.getActiveWindow().getView().isShowParagraphs());
    //SET THE VIEW PROPERTIES
    wordView.setShowAll(false);
    wordView.setShowParagraphs(true);
    //PRINT THEM AGAIN
    System.out.println("Show All: " + wordApp.getActiveWindow().getView().isShowAll());
    System.out.println("Show Paragraphs: " + wordApp.getActiveWindow().getView().isShowParagraphs());
    doc.close(Document.DO_NOT_SAVE);
    wordApp.quit(new Variant[] {});
    System.exit(0);The actual Dispatch calls are:
    //NO IDEA WHY THIS IS, BUT SHOWALL = TRUE IS -1, AND FALSE IS 0
    private final static int SHOW_ALL_TRUE = -1;
    private final static int SHOW_ALL_FALSE = 0;
    /** SETSHOWPARAGRAPHS **
    * Sets the property (boolean) ShowParagraphs.
    public void setShowParagraphs(boolean showParagraphs)
         Dispatch.put(this, "ShowParagraphs", new Boolean(showParagraphs));
    /** ISSHOWPARAGRAPHS **
    * Returns Boolean of whether or not this is set to show paragraphs.
    public boolean isShowParagraphs()
         return getBooleanValue(Dispatch.get(this, "ShowParagraphs"));
    private boolean getBooleanValue(Variant variantBoolean)
         //MAKE IT AN INTEGER AND GET ITS int VALUE
         int intVariant = new Integer(variantBoolean.toString()).intValue();
         //RETURN IF IS SHOW ALL
         return (intVariant == View.SHOW_ALL_TRUE);
    }I'm wondering if the problem is that I get back either -1 or 0 and if maybe that means something else?

    1: Properties persistence is not a DEFECT but a FEATURE . It was implemented in MS Word so users could change MS word WITHOUT HAVING TO DO IT EACH TIME THEY START IT UP.
    2: Don't you intialise all your variables in your code after you instanciated them ? I am sure you do so and therefore the persitence feature you described should not be annoying you at all. It is not necessary to intialise variables in the BASIC langage but that does not mean you should not do it.
    3: (-1) was chosen arbitrary by Microsoft as the TRUE value for Boolean datatype and 0 the value for FALSE when they designed Visual Basic. This is not a problem if you write code properly
    I recommend you test bool variable in any langages using the following test:
    (myBool <> 0)
    HAVE A THINK ABOUT IT
    Finally,
    you need to understand what you are working with before you complain about it.
    Argument for Argument sake is not good and if you think MS word is a bad program just don't use it. go and write your own word processor in JAVA.
    GOOD LUCK
    I WISH TO APOLOGISE FOR ANY POSSIBLE SPELLING OR GRAMMATICAL MISTAKES I COULD HAVE MADE IN THIS REPLY. ENGLISH NOT BEING MY FIRST LANGUAGE.

  • Read sharing violation after System.exit in oracle lite DLL

    I am using JRE 1.3 and successfully managed running some sql statements over jdbc.
    When the java class is finished (implicit exit) then no error appears.
    When I exit the code using System.exit(0) there is a windows dialog
    showing a read access error AFTER the java class finished.
    probably there is some cleanup the oracle DLL wants to do after the JVM exited?
    Please help mailto:[email protected]
    The sample code below can be used.
    * Title:
    * Description:
    * Copyright: Copyright (c) 2001
    * Company:
    * @author Ivan Motsch
    * @version 1.0
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    public class TestOracleLite{
    public TestOracleLite(){
         public void start(){
              Statement stm=null;
              Connection conn=null;
              try{
                   Properties p=new Properties();
                   p.setProperty("user","system");
                   p.setProperty("password","manager");
                   p.setProperty("DataDirectory","..\\..\\..\\TEMP\\ora4\\db");
                   p.setProperty("Database","ORS");
                   p.setProperty("IsolationLevel","Read Committed");
                   p.setProperty("Autocommit","Off");
                   p.setProperty("CursorType","Forward Only");
                   String ps=getPropertiesAsString(p);
              Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
                   conn=DriverManager.getConnection("jdbc:polite:whatever"+ps);
                   execSql(conn,
                        "drop table test1 cascade"
                   execSql(conn,
                        "create table test1(pk number(32),ncol number(32),scol varchar2(2000),dcol date,rcol long raw)"
                   conn.commit();
                   execSql(conn,
                        "insert into test1(pk,ncol,scol,dcol,rcol) values(?,?,?,?,?)",
                        new Object[]{new Integer(1),new Integer(1111),"Test Text",new java.sql.Date(System.currentTimeMillis()),new byte[]{0,1,2,3,4,5,6,7,8,9,10}}
                   conn.commit();
                   readSql(conn,"select * from test1");
              catch(Exception e){
              e.printStackTrace();
              finally{
                   if(conn!=null){
                        try{
                        conn.close();
                             conn=null;
                        catch(Exception e){e.printStackTrace();}
         private static String getPropertiesAsString(Properties p){
              StringBuffer buf=new StringBuffer();
         for(Iterator it=p.keySet().iterator();it.hasNext();){
              String key=(String)it.next();
                   String val=p.getProperty(key);
                   buf.append(";"+key+"="+val);
              return buf.toString();
         public boolean execSql(Connection conn,String s){
              return execSql(conn,s,(Collection)null);
         public boolean execSql(Connection conn,String s,Object[] binds){
              ArrayList list=new ArrayList();
              if(binds!=null) list.addAll(Arrays.asList(binds));
         return execSql(conn,s,list);
         public boolean execSql(Connection conn,String text,Collection binds){
              PreparedStatement stm=null;
              try{
                   stm=conn.prepareStatement(text);
                   if(binds!=null){
                        int i=1;
                        for(Iterator it=binds.iterator();it.hasNext();){
                             Object o=it.next();
                             if(o==null){
                                  stm.setNull(i,Types.VARCHAR);
                             else if(o instanceof byte[]){
                                  stm.setBytes(i,(byte[])o);
                             else{
                                  stm.setObject(i,o);
                             i++;
                   boolean b=stm.execute();
                   System.out.println("status: "+(b?"ok":"failed"));
                   return b;
              catch(SQLException e){
                   System.out.println("status: "+"error"+" "+e);
                   return false;
              finally{
                   if(stm!=null) try{stm.close();}catch(Exception e){}
         public boolean readSql(Connection conn,String text){
              PreparedStatement stm=null;
              try{
                   stm=conn.prepareStatement(text);
                   ResultSet rs=stm.executeQuery();
                   ResultSetMetaData meta=rs.getMetaData();
                   System.out.print("col: ");
                   for(int i=1,n=meta.getColumnCount();i<=n;i++){
                        System.out.print(""+meta.getColumnName(i)+", ");
                   System.out.println();
                   while(rs.next()){
                        System.out.print("row: ");
                   for(int i=1,n=meta.getColumnCount();i<=n;i++){
                             System.out.print(""+rs.getObject(i)+", ");
                        System.out.println();
                   return true;
              catch(SQLException e){
                   System.out.println("status: "+"error"+" "+e);
                   return false;
              finally{
                   if(stm!=null) try{stm.close();}catch(Exception e){}
         static public void main(String[] args) {
              TestOracleLite t=new TestOracleLite();
              t.start();
              t=null;
              System.exit(0);

    Hi
    After system copy you need to do post system copy activities...
    Please follow according to the installation Guide..
    for example: your sld connection of your new system will be pointing to your source system. So you need to go to VA where in you can find SLD Data Supplier and change the host name, port no relavent to this  i.e. your destination system...i.e.
    new system.. In the same way you can follow doing the post installation activites will solve your issue.
    Regards
    Hari

  • NoClassDefFoundError after System.exit() is called.

    I have found a strange condition with JDK 1.4.2_05 and could not find a bug which relates to it.
    I have multiple threads running, when I shutdown, I call all the threads to shutdown and finally in main I call System.exit(0).
    The strange thing is that one shutdown I get a NoClassDefFoundError for a class which will load fine if loaded before shutting down.
    This occurs as the class in question is only needed to perform a shutdown, and in fact the attempt to load it comes after the main thread has finished.
    The workaround has been to create an instance of the class when the application is started rather than during shutdown.
    Does anyone seen this behaviour?

    java.lang.NoClassDefFoundError: com/cantor/framework/run/impl/ShutdownRMB
         at com.can.framework.run.RunnerManagerBean.shutdown(RunnerManagerBean.java:147)
         at com.can.framework.layer.VanillaBean.shutdown(VanillaBean.java:278)
         at com.can.main.Main.main(Main.java:135)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)

  • Firefox process is left running in memory after exit

    The firefox *32 process is left running in memory after exiting Firefox. You cannot restart firefox without either killing the process (ctrl-alt-del ...) or restarting the computer.
    I am running Windows 7 pro 64bit and Firefox 6.0.2 swedish version.
    I haven't had this kind of a problem with prior versions of Firefox.

    Firefox is already running but is not responding
    * https://support.mozilla.com/en-US/kb/Firefox%20is%20already%20running%20but%20is%20not%20responding
    Profile in use
    * http://kb.mozillazine.org/Profile_in_use
    Check and tell if its working.

  • When i exit firefox &try to reopen the message is showing as Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.why this happens even i close it by exit.

    after i exit firefox & tried to open,it is not opening,instead this message is coming as 'Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.'kindly help me.everytime to open i have to go to task manager & stop the process.

    [https://support.mozilla.com/en-US/kb/Firefox%20hangs#w_firefox-hangs-when-you-quit-it Firefox hangs when you close it]

  • I keep getting this message after closing Firefox and attempt to reopen-Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.

    I keep getting this message after closing Firefox and attempt to reopen-Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.

    See:
    * http://kb.mozillazine.org/Recovering_a_missing_profile
    * http://kb.mozillazine.org/Profile_in_use

  • Post processing after system copy from standalone to cluster enviornment

    Hi,
    I have done a system copy(Backup restore method) from a standalone quality BW (QBW) system to cluster environment (TBW).
    The steps I have followed as follows.
    . setup the machines in the cluster environment  ( Windows 2003 EE server,sql 2005 SP3)
    . Backup the current database in the source system
    . Given a different SID (TBW) during the System copy installation .its a dual stack installation.
    . Restore the database in the target system and select the back up restore method during the system copy database installation step.
    .The installation completed successfully and i m having some doubts regarding the post processing steps after this .
    We want to retain the same client in the target system ,for this i need to rename the  logical name .Kindly assist me for changing the logical name for the extraction of BW delta process from extraction server to BW system and also the other steps I have to follow after system copy.
    Thanks
    Arun Padikkal

    Hi Arun,
    You should probably post this question in a basis forum.
    Cheers,
    Diego

  • Job in BODS is failing with an error " Your system is running low on process virtual memory".

    hello,
    I am facing an error with one of my job which is running on BODS server. The job is failing daily since last one year with the same error " Your system is running low on process virtual memory". We checked with team which deals with space issue and the space is sufficient enough.
    Please help me with this error and what can be done to do away with this.
    Regards,
    Ritu Sharma

    Greetings Narendra,
    It may help if you were to explain in more detail the software product you are encountering this issue. There are about 500 different products that might be encountering this issue. Specifying which product you are using will assist the Forum Team in providing an appropriate response.
    Thank you,
    Rob
    Technical Engineer
    Customer Assurance

  • Unable to open a new window you must first close exsisting firefox process or restart your system. There is no firefox process running why should I receive this error msg?

    I closed a Firefox process. Then clicked the FF icon to restart my browser. I received an error message. " Firefox is already running, but not responding. To open a new window you must first close existing Firefox process, or restart your system. However there is no Firefox process running to begin with. I checked the task manager.
    == This happened ==
    Every time Firefox opened

    It takes Firefox 5-15 seconds to completely close and for the OS to release the processes; it may take longer if you have a Flash animation/video running in one of the tabs. If not waiting long enough is not the problem, you can try the following to determine if an Extension or Plugin might be causing Firefox to hang at exit.
    <u>'''Kill Application'''</u>
    In Task Manager, does firefox.exe show in the <u>'''Processes'''</u> tab?
    See: [http://kb.mozillazine.org/Kill_application Kill Application]
    '''<u>Causes and solutions for Firefox hanging at exit:</u>'''
    [[Firefox hangs]]
    [http://kb.mozillazine.org/Firefox_hangs#Hang_at_exit Firefox hangs at exit]
    [[Firefox is already running but is not responding]]
    <u>'''Safe Mode'''</u>
    You may need to use '''[[Safe Mode]]''' (click on "Safe Mode" and read) to localize the problem. Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes <u>'''before'''</u> starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    See:
    '''[[Troubleshooting extensions and themes]]'''
    '''[[Troubleshooting plugins]]'''
    '''[[Basic Troubleshooting]]'''
    If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling <u>'''one at a time'''</u> until the problem reappears. <u>'''You MUST close and restart Firefox after EACH change'''</u> via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.

  • When I try to start Firefox I get Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.

    I get this message when I try to start Firefox after first logging on after turning on the computer.
    Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.
    Have rebooted. Works when Administrator logs in, just does this in my user profile. Have also re-intalled. Mo change in my User account.
    Firefox was working fine for the last 3 1/2 years. Any suggestions?

    Firefox is "hanging at exit" when you exit/quit Firefox.<br /><br />
    #Stop the Firefox process:
    #*[http://kb.mozillazine.org/Kill_application Mozillazine - Kill application]
    #*Windows 7 users click [http://www.techrepublic.com/blog/window-on-windows/reap-the-benefits-of-windows-7s-task-manager/2576 here]
    #*Mac users: http://techheavy.com/2011/02/the-mac-task-manager/
    #Why Firefox may hang:
    #*[http://support.mozilla.com/en-US/kb/Firefox+hangs Firefox hangs] (see Hang at exit)
    #*[http://kb.mozillazine.org/Firefox_hangs Firefox hangs (Mozillazine)] (see Hang at exit and Closing Firefox properly)
    #*[https://support.mozilla.com/en-US/kb/Firefox+is+already+running+but+is+not+responding Firefox is already running but is not responding]
    #Use Firefox Safe Mode to find a problem with an Extension or Plugin:
    #*Don't check anything when entering Safe Mode, just continue
    #*If the problem does not occur in Safe Mode it is probably and Extension or Plugin causing the problem
    #*See:
    #**[[Safe Mode]] and [http://kb.mozillazine.org/Safe_Mode Safe Mode (Mozillazine)]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    #**[http://support.mozilla.com/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system. I have a wndiws 7 system and use a Intel core processor. I have restarted several times and still ge this

    Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system. I have a wndows 7 system and use a Intel core processor. I have restarted several times and still ge this error. I have also tried to reinstall firefox and get the same error
    == This happened ==
    Every time Firefox opened
    == today ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDS; InfoPath.2; .NET4.0C; AskTbUT2V5/5.8.0.12304)

    <u>'''Kill Application'''</u>
    In Task Manager, does firefox.exe show in the <u>'''Processes'''</u> tab?
    See: [http://kb.mozillazine.org/Kill_application Kill Application]
    '''<u>Causes and solutions for Firefox hanging at exit:</u>'''
    [[Firefox hangs]]
    [http://kb.mozillazine.org/Firefox_hangs#Hang_at_exit Firefox hangs at exit]
    [[Firefox is already running but is not responding]]
    <u>'''Safe Mode'''</u>
    You may need to use '''[[Safe Mode]]''' (click on "Safe Mode" and read) to localize the problem. Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes <u>'''before'''</u> starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    See:
    '''[[Troubleshooting extensions and themes]]'''
    '''[[Troubleshooting plugins]]'''
    '''[[Basic Troubleshooting]]'''
    If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling <u>'''one at a time'''</u> until the problem reappears. <u>'''You MUST close and restart Firefox after EACH change'''</u> via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.

  • I consistently get this messsage and have to restart the system - "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system". When I look at the Task Manager no Fire

    I consistently get this message and have to re'boot my system. "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system"
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 3.0.04506; InfoPath.2; Media Center PC 5.0; SLCC1)

    <u>'''Kill Application'''</u>
    In Task Manager, does firefox.exe show in the <u>'''Processes'''</u> tab?
    See: [http://kb.mozillazine.org/Kill_application Kill Application]
    '''<u>Causes and solutions for Firefox hanging at exit:</u>'''
    [[Firefox hangs]]
    [http://kb.mozillazine.org/Firefox_hangs#Hang_at_exit Firefox hangs at exit]
    [[Firefox is already running but is not responding]]
    <u>'''Safe Mode'''</u>
    You may need to use '''[[Safe Mode]]''' (click on "Safe Mode" and read) to localize the problem. Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes <u>'''before'''</u> starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    See:
    '''[[Troubleshooting extensions and themes]]'''
    '''[[Troubleshooting plugins]]'''
    '''[[Basic Troubleshooting]]'''
    If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling <u>'''one at a time'''</u> until the problem reappears. <u>'''You MUST close and restart Firefox after EACH change'''</u> via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.

Maybe you are looking for