This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
nb 200409220845 + me040923, jdk1.5.0-b63, Motorola iDEN SDK for J2ME(TM) Technology I have a j2me project. When I run it on motorola's emulator the process build.xml(run) runs forever in IDE even if I finish the emulator. There is a message from emulator that it cannot write somewhere - probably their bug but the IDE should finish the process. I'll attach threaddump, part of output and exception that I received when I wanted wanted terminate the process manually.
Created attachment 17840 [details] thread dump
Created attachment 17841 [details] part of output and exception
Well it's your task, so I'm afraid you'll have to debug it, unless you can supply a stripped-down test case not involving special J2ME things that also repeatably fails. (On Win only? or on all platforms?) Might e.g. be a problem in Ant, or a problem in Java. The IDE certainly is not directly involved in spawning the external process, so it is unlikely (though possible) that the bug is in the IDE. Try the script from the command line first. Re. the ThreadDeath exception that can be printed when stopping the process - known that this can happen, but not necessarily straightforward to deal with. A full UI for shutting down Ant processes more cleanly is planned for a subsequent release; may involve API changes in the execution engine and/or output window.
This bug is well-known in Ant (was AntStreamPumper now it is in PumpStreamHandler). See http://issues.apache.org/bugzilla/show_bug.cgi?id=5003 I think it cannot be fixed on our side (except we create patched Ant).
one more comment try on Windows in J2SE project create class with: public static void main(String args[]) throws Exception { Runtime.getRuntime().exec("notepad"); System.out.println("finished"); } and execute it - you will see the bug
to Adam's example : the build process is finished when I close the notepad. And that's behaviour that i'd exactly expect. But the ant process isn't finished even if the run app (emulator) is finished and that's the difference.
The behavior of the example is not correct (compare it to something similar on Linux or other systems). Ant process must finish when your process has finished and not after all stream are closed. I think that on Unix systems standard stream cannot survive its owning process. The example shows how the out and err streams are pushed to all invoked processes from yours and that Ant does not end until all of them are closed. Motorola emulator might cause some stream to stay opened and this is the result. Solution for Ant is to implement interruptable stream pumpers, try to join them with some timeout when the process has finished and interrupt them after the timout expired. Everything about this issue is described in Ant Bugzilla.
verifying all old issues