Destroy problem!

I have a Java program that runtime exec's several other Java
programs. I'm looking for a
way to destroy the java process. I try to call destroy method but it doesn't work, the process continue executing.
public String start() {
rt = Runtime.getRuntime();
try {
processo = rt.exec("cmd /K start java StartELAB");
catch (Exception ex) {
ex.printStackTrace();
return "";
public String stop {
int i = 0;
if(processo != null) {
try {
processoElab.destroy();
catch (Exception ex) {
ex.printStackTrace();
//StartELAB doesn't stop.
Help me!!!!!

One possible reason for the problem is that the windows shell processor (CMD) always ask "Are you sure?" and wait for an input when interrupted (try running a batch file or a cmd command and hit "Ctrl-C"). So the destroy may work but CMD is asking the stupid question and waiting for input. You can try and verify it by running some other CMD command beside java.
One possible solution is to run the JVM directly without using CMD.
Yair.

Similar Messages

  • Thread destroy problem

    I have a thread that is started in the main method
    thread1.start();I am trying to ensure thread saftey by having a finally block that is executed in the run method this should close the thread
    thread1.destroy();However I think because it is in a different method it is not recognising thread1.destroy
    is my logic totally wrong here?

    I am trying to ensure thread saftey by having a
    finally block that is executed in the run method this
    should close the thread
    thread1.destroy();
    How clever.
    However I think because it is in a different method it
    is not recognising thread1.destroyThe variable is out of scope if you've declared it as a local variable. Declare it as a member variable (non-static preferably). And it might even work.
    >
    is my logic totally wrong here?Unfortunately yes, and since you're posting a Thread question on "New To Java Technology" I share your pain.

  • Problems with PObject::destroy(void*) and commit after this

    Hi there
    I have some problem with delete garbage objects.
    For example:
    I create my object
    MyObject * o = new (conn,"MY#TABLE") MyObject();
    if (some_condition)
    PObject::destroy(o);
    delete o; //this work well
    //but after this
    conn->commit();
    I have got the error
    OCI-21710: argument is expecting a valid memory address of an object
    help me anybody
    can I delete/destroy object if one has been init over new (conn,table)
    and absent problem with commit after this ?

    Thank you for answer
    but what you mean about this code ?
    MyObject * o = new (conn,"MY#TABLE") MyObject();
    if (some_condition)
    o->markDelete();
    PObject::destroy(o);
    delete o;
    //but after this
    conn->commit();
    This is work without error.
    Message was edited by:
    pavel

  • Bridge has started to destroy our JPEGs; known problem?

    Hi,
    half an hour ago something - possibly Bridge - has obviously started to destroy our JPEGs. We first noticed strange artefacts in the Bridge previews; then we were shocked when we discovered that the files themselves were altered (without changing the modification date of the file). We checked this by connecting the external drive that contains the files to another computer: It's not a problem with the previews, the files themselves are destroyed. (On this other computer GIMP gives the error "Corrupt JPEG data: 3841 extraneous bytes before marker 0xd9" when opening the file I've attached to this post.)
    Fortunately the NEF files are unaltered. A check of the hard drive shows no problems.
    We're not 100% shure that Bridge is causing this - but since Bridge was the only program open at the time and since the problem developed while using Bridge it seems very probable to us that Bridge is involved in this phenomenon.
    Did you observe anything similar? Is this a known problem? We didn't find anything when searching Google or this forum.
    Thanks for your help!
    (We're using Adobe Bridge CS5 4.0.5.11 on an iMac with Mac OS X 10.7.5)

    - mainly (only? I don't know exactly) files are affected where we added metadata;
    The clue about no change in modification date in the first post would mean you did not alter the files. However this changes things because you seem to have done so.
    In normal use while adding metadata or rename the file needs to be saved again to apply the changes. While doing so Bridge updates the thumbs and previews to reflect the new situation.
    If this save action would be the cause of the destroyed jpegs they should have shown so immediate after applying the changes. But yes, we all are in a hurry and have a short memory
    If you have pointed Bridge to another folder while the save was still in progress then you would not notice it but also the cache is not likely to rebuild until you point Bridge again to the folder.
    The moment you point Bridge to that folder first the thumb rebuilds and then the preview to reflect the changes. Because the modification date did not change to the date you saw the changes happening it is likely the problem has been caused before but you have not noticed earlier until you pointed Bridge to this folder which started the recaching of the files (only modification of the cache file, not the original jpeg) to reflect the new situation.
    Don't use Gimp myself but a jpeg is a jpeg and an international standard so they both should be able to read and write correct files.
    Therefor it stays a strange problem and you should back up your files frequently in case this starts happen again. If it is a one off we keep wondering what it might have been but if it repeats I would first suspect the disk (running a health scan is not always pointing to other problems like correct read write permissions and also folders can get corrupted for strange reasons).
    BTW, I never have been a fan of RAID, to expensive and to much space needed. A simple back up scheme with different disks has always done the trick for me.

  • Problem with Premiere Pro CC - destroyed clips after re-opening a project

    Hey there,
    I´m currently experiencing a big issue that is costing me tons of time. I can work just fine on my project, until I close it. After re-opening the project, all the clips within my sequence start over at every cut I´ve made. That means, I dont have a continious video anymore, and my whole project is destroyed. I cant seem to repair it either, and so far, had to start over.
    Note: this only happens once I close and re-open the project. So, something must be going wrong while closing the project.
    Here are the facts that might be of relevance:
    I´m using:
    - .mov videofiles ( filmed with NTSC / ALL-I 30 fps, 1920x1080 )
    - .wav audiofile
    - pluraleyes 3 for syncing
    - sequences in the project are set on 1920x1080p but on 25fps.
    - I´ve been working on an internal SSD
    what I have already tried:
    - "reconnect" the source files by saving them in a different location
    - working on a different PC
    - try backup files and autosaves ( they look all the same, dont ask me why )
    Everything works perfectly fine besides that issue. I haven´t found any reasonable help on that matter while searching trough the web, so I´m coming to you.
    I´m hoping to find a solution for this problem, as its preventing me from making any progress. Please let me know if you need more information about the project and/or the issue.
    Thanks in advance!

    If you're working with multicam sequences, then it sounds like you're running into an issue that was fixed in update 7.0.1.
    This is the main thread on that issue: http://forums.adobe.com/message/5548970#5548970. For some users, the fix has redeemed sequences bitten by the bug.
    If you're not editing multicam sequences or you already have 7.0.1 installed, then please provide more info about the nature of your sequences, merged clips, etc.

  • Struts redeploy problem: failed while destroying filter

    I've deployed a webapp with struts2 on weblogic 8.1/java 1.4.1_02 from a war file. It works fine, but when I make a redeploy it throws an exception with the following two stack traces. The NoClassDefFoundError seems strange to me, because the two jars struts2-core.jar and backpost-util-concurrent.jar (for retrotranslation of struts2) contain the classes correctly.
    Thanks for any help.
    <Failed while destroying filter: struts2.java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable
    at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:260)
    at org.apache.struts2.dispatcher.FilterDispatcher.destroy(FilterDispatcher.java:221)
    at weblogic.servlet.internal.WebAppServletContext$FilterDestroyAction.run(WebAppServletContext.java:6394)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.destroyFilters(WebAppServletContext.java:5786)
    at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:5682)
    at weblogic.servlet.internal.ServletContextManager.removeContext(ServletContextManager.java:188)
    at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:740)
    at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:767)
    at weblogic.servlet.internal.WebAppModule.rollback(WebAppModule.java:745)
    at weblogic.j2ee.J2EEApplicationContainer.rollbackModule(J2EEApplicationContainer.java:3057)
    at weblogic.j2ee.J2EEApplicationContainer.rectifyClassLoaders(J2EEApplicationContainer.java:1429)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1176)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    <Failed while destroying filter: struts2.java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/Arrays
    at edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList.toArray(CopyOnWriteArrayList.java:99)
    at edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList.<init>(CopyOnWriteArrayList.java:35)
    at com.opensymphony.xwork2.config.ConfigurationManager.setConfigurationProviders(ConfigurationManager.java:100)
    at com.opensymphony.xwork2.config.ConfigurationManager.destroyConfiguration(ConfigurationManager.java:141)
    at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:283)
    at org.apache.struts2.dispatcher.FilterDispatcher.destroy(FilterDispatcher.java:221)
    at weblogic.servlet.internal.WebAppServletContext$FilterDestroyAction.run(WebAppServletContext.java:6394)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.destroyFilters(WebAppServletContext.java:5786)
    at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:5682)
    at weblogic.servlet.internal.ServletContextManager.removeContext(ServletContextManager.java:188)
    at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:740)
    at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:767)
    at weblogic.servlet.internal.WebAppModule.rollback(WebAppModule.java:745)
    at weblogic.j2ee.J2EEApplicationContainer.rollbackModule(J2EEApplicationContainer.java:3057)
    at weblogic.j2ee.J2EEApplicationContainer.rectifyClassLoaders(J2EEApplicationContainer.java:1429)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1176)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >

    I had similar problem a while ago. The remedy I had at that time is placing the jar files containing the classes in the "global" classpath to BEA servers, not just put them in the directories that only available for one particular web application. It's a working solution. I am sure there's other way to fix it. My guess is that the security manager for individual applications is setup more strictly. However, I haven't really been able to verify that.

  • I had a failure of a dsl modem which inturn destroyed my ethernet port of non isight imac G5.  In attempt to solve the problem I did a clean install of leopard 10.5.4. I am unable to upate to 10.6,.7  or .8 without freezing system network preferences

    Dsl modem failure caused malfunction of ethernet port.  In attempt to solve problem I did a clean instillation of  Leopard 10.5.4 and then update to 10.5.5 with access to internet through apple usb to ethernet adapter.  If I attempt to update software to 10.5.6, .7 or .8 it freezes my network system preferences and computer will no longer shut down.  The network connection assistant also no longer sees a connection to the internet throught the usb/ethernet adapter.  I have checked they systerm Tech tool deluxe which shows no problems and also used hard drive utility on instillation disk which found no problems.  Permissions were also checked as well and no problems noted.  Any thoughts as I really like my imac G5.

    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    If all the above fails, then it appears to be time for a relatively painless Archive & Install, which gives you a new/old OS, but can preserve all your files, pics, music, settings, etc., as long as you have plenty of free disk space and no Disk corruption, and is relatively quick & painless...
    http://docs.info.apple.com/article.html?artnum=107120
    Just be sure to select Preserve Users & Settings.

  • Upgrade to Final Cut 10.0.7 destroyed my generators created in Motion that include drop zones. Anyone experienced the same problem ?

    In Motion 5 I created generators that included a drop zone. The objective it to bring them into Final Cut and insert into the drop zone a clip of the same duration.
    In FCX 10.0.6 I used to bring a clip to the time line and re size it to the exact duration of my generator. Then I bring the generator to the time line and selected the generator, click in the drop zone of the published parameters menu and select this clip I wanted to insert. The result was the generator using my clip and the clip playing during all the duration of the generator with the generator effect.
    Now, with 10.0.7 I can’t make that work. When I click in the clip I would like to import into the drop zone, the result is that there’s just a frozen image of the clip (in the same place I clicked with the mouse)
    Is this a known problem of 10.0.7. It used to work well in 10.0.6
    Thanks for your help !

    I can't see that the update would have any effect on custom generators as they are housed separately from FCP X.
    Many weird things happen as a result of corrupt preferences which can create a vast range of different symptoms, so whenever FCP X stops working properly in any way, trashing the preferences should be the first thing you do using this free app.
    http://www.digitalrebellion.com/prefman/
    Shut down FCP X, open PreferenceManager and in the window that appears:-
    1. Ensure that only  FCP X  is selected.
    2. Click Trash
    The job is done instantly and you can re-open FCP X.
    There is absolutely no danger in trashing preferences and you can do it as often as you like.
    The preferences are kept separately from FCP X and if there aren't any when FCP X opens it automatically creates new ones  .  .  .  instantly.

  • Problems with "init(),start(),stop() & destroy()".

    1.When an applet page has been overidden by another page,why didn't the data member has not bee changed?
    See the code :
    import java.awt.*;
    import java.applet.*;
    <applet code="BlankApplet" width="200" height="100">
    </applet>
    public class BlankApplet extends Applet {
      private String msg;
      private int times;
      public void init() {
        msg = "First Applet";
      public void start() {
        times ++;
        msg = "The applet has been reloaded for " + times + "times.";
      public void stop() {
      public void paint(Graphics g) {
        g.drawString(msg,10,15);
        System.out.println(msg);
      public void destroy() {
    }when i try to replace the applet page with another page , and then back to the applet page and fresh it. The browser always printed "The applet has been reloaded for 1 times".
    I can't understand,when the applet page has been replaced with another,the applet is still alive,and when the applet page once be loaded, the method "start()" will be invoked, then the data member "times" will increase 1,but why it always be "1" ?
    2.When will the method "destroy()" be invoked ? Can u give me an example ?

    Apparently the browser instantiates a new applet object when it loads a page with an applet in it, even if that page has been loaded before. Interesting, but so what.
    Another interesting thing to consider, is to create a static counter and increment that in start(). Then you can see whether it reloads the class between page loads.

  • Serious Logic Problem - Destroyed all my sounds...:(

    Hey Guys !
    While I was working on my project, something happened to my audio files.
    Take a look: http://img145.imageshack.us/img145/6706/omgvs8.jpg
    Everything is now destroyed... Can I get the files back in the original condition ?
    If not, hours of work are destroyed...

    And what is it that we're supposed to deduce from a tiny screengrab of an audio region?
    What do you mean by "destroyed"..?

  • Paviliion tx 1000 Overheating Destroys Motherboard - Design Problem

    I bought my son a Pavilion tx 1000 for college. The warranty recently expired, and now the motherboard needs to be replaced because of overheating. Two different computer diagnosticians have told me that this is a design problem caused by HP's use of environmentally-friendly soldering in laptops with processors that generate too much heat for the solder. HP has already recalled another model for this reason but has refused to address the same design issues with the tx 1000. We have been told to either replace the board for $400+ or buy a new computer. We are looking for avenues to push HP into solving the problem on the tx1000 the same way they have on other designs...with a recall. Any ideas?
    My son needs a laptop ASAP, but if we have to buy a new one it won't be an HP. I am also the CEO of a new start-up company that will need 300+ computers over the next year. If this problem is not fixed to my satisfaction, we will not have a single HP in the new company and will recommend avoiding HP to all our customers and vendors.

    I believe I am starting to have the same problem.  My laptop just ran out of warranty and though I cannot prove it, I believe it is overheating.  Both my daughter and I have a TX 1000 and we both noticed when we got them that the bottoms were way too hot to set in your lap (funny for a laptop).  The heat has always poured out of this thing. 
    I keep this laptop in the bedroom for cruising the web and usually only use it at night.  Regardless as of March 12, it began shutting itself down.  At first I thought it was a Windows update, but after doing all the appropriate removal, the problem is still there.  I can even feel the heat on the palm rest now.  And this is a well taken care of laptop, never been on trip, never moved around, banged, or mistreated.  Used mostly to cruise the web, write a few documents and balance my check book.  Sucks, huh?

  • Problem ipod destroyed

    I destroyed my Ipod 4 with a mass because it was not working well. Then after a portion of the Ipod was extremely hot and smelled strongly, is it dangerous? What can I do?

    Purchase a new or refurbished iPod.
    Apple may be able to exchange it for a refurbished iPod for $199 for the 64 GB one and $99 for the others as an out-of-warrarty service. However, Apple says:
    If Apple determines that an iPod is not repairable, for example, if it has failed due catastrophic damage or the iPod has been disassembled into multiple pieces, then Out-of-Warranty Service is not available and the iPod will be returned. Please see Apple's Repair Terms And Conditions for further details.
    Make an appointment at the Genius Bar of an Apple store and find out.
    Apple Retail Store - Genius Bar

  • Problem with oracle 11g XE restore is destroyed. Can I use the datafiles to restore information?

    Hello,
    My home machine (win 7) suffered from hardware failure.
    My backup seems to be unusable.
    Fortunately I had the data folder on a separate drive so all my database files are safe.
    Is it possible to install a fresh 11g XE and use the database files to restore the data?

    >> but the tablespace is totaly empty
    That is what REUSE does when adding a datafile.
    When datafiles from an old instance are available, they can be added to the instance by recreating the controlfile(s), either a) adjust the CONTROL_FILES parameter to point at new filename(s), or b) just move (or remove) all the instance controlfiles, shutdown immediate; startup nomount, do the CREATE CONTROLFILE ... ; DDL, alter database open resetlotgs; and recreate the tempfile(s).
    See the post How to and when to recreate control files. for a nice how-to.
    Basically the create controlfile steps bring the old instance back to life (aka reincarnate). The important bit can be had by doing an alter database backup controlfile to trace; as mentioned in one of the comments, trace file with the DDL is created in the instance trace folder with the create controlfile... and other bits of info.
    One caveat, if the instance was open datafile recovery is required before opening the database, and will require the archivelog files to redo committed transactions and rollback uncommitted transactions. If the instance was not in archivelog mode, the old redo logfiles *might* have enough info for the recovery. Or they may not- that is a risk of noarchivelog mode.

  • 5G IPOD Install: Drive problem and destroyed CD/DVD drive access - HELP!!!!

    5g video IPOD 30G, Windows 2000 - Installed IPOD software and Itunes. Connected IPOD and got disk access error message. Not only I can't get to my IPOD, but it did something to my CD/DVD drivers. Drivers no longer load with an error that windows can't load driver for this device.
    Uninstalled itunes and ipod. Still no drive.
    Anyone has any idea?

    well done Josh!
    In any case after the media 7.1 is removed, drivers finally loaded up OK again. Then IPOD reinstall worked.
    ouch. so you were getting a code 31?
    Cannot Access CD-ROM and "Code 31" Error Message in Device Manager After You Remove Adaptec Easy CD Creator from Your Computer
    (although the title of the MS KB doc doesn't mention it, Windows Media 7 is listed as possible cause of this in there.)
    love, b

  • Problem with threads within applet

    Hello,
    I got an applet, inside this applet I have a singleton, inside this singleton I have a thread.
    this thread is running in endless loop.
    he is doing something and go to sleep on and on.
    the problem is,
    when I refresh my IE6 browser I see more than 1 thread.
    for debug matter, I did the following things:
    inside the thread, sysout every time he goes to sleep.
    sysout in the singleton constructor.
    sysout in the singleton destructor.
    the output goes like this:
    when refresh the page, the singleton constructor loading but not every refresh, sometimes I see the constructor output and sometimes I dont.
    The thread inside the singleton is giving me the same output, sometime I see more than one thread at a time and sometimes I dont.
    The destructor never works (no output there).
    I don't understand what is going on.
    someone can please shed some light?
    thanks.
    btw. I am working with JRE 1.1
    this is very old and big applet and I can't convert it to something new.

    Ooops. sorry!
    I did.
         public void start() {
         public void stop() {
         public void destroy() {
              try {
                   resetAll();
                   Configuration.closeConnection();
                   QuoteItem.closeConnection();
              } finally {
                   try {
                        super.finalize();
                   } catch (Throwable e) {
                        e.printStackTrace();
         }

Maybe you are looking for

  • What is part number for Limited Edition (Canad

    I want to order ONLINE from a Canadian retailer a Zen Micro. Does anyone know how or if I can still find a limited edition model with the free battery in Canada? I want to order ONLY from a Canadian online retailer, not US. I see different part numbe

  • How to clear your start up disk?

    How do you empty your start up disk up?

  • Coding external SAS data with TMS

    Hi, I extracted data from the datbase of a datamanagement system other than OC. The data extracted are in SAS format and I would like to code them with TMS. We also have Oracle Clinical installed with TMS. How can I proceed to do that? Thanks

  • Shorcut key to print current page

    hi everyone,when viewing a page,is there any shortcut key that i can press to print the current page automatically without going through print(in the taskbar) - current page - ok.

  • PSE11 and  Photoshop CS5 simultaneously

    Can I install PSE 11 on a system where Photoshop CS5 is already installed ?