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.
/** Starts TopThreadGroup which properly overrides uncaughtException
* Further - new thread in the group execs main
*/
public static void main (String[] argv) {
public static void main (String[] argv) throws Exception {
TopThreadGroup tg = new TopThreadGroup ("IDE Main", argv); // NOI18N - programatic name
StartLog.logStart ("Forwarding to topThreadGroup"); // NOI18N
tg.start ();
System.out.println("FINISHED!!!!");
}
final class TopThreadGroup extends ThreadGroup implements Runnable {
/** The command line args */
private String[] args;
/** flag that indicates whether the main thread had finished or not */
private boolean finished;
/** Constructs a new thread group. The parent of this new group is
* the thread group of the currently running thread.
public void start () {
public synchronized void start () throws InterruptedException {
Thread t = new Thread (this, this, "main"); // NOI18N
t.start ();
while (!finished) {
wait ();
public void run() {
} catch (Throwable t) {
// XXX is this not handled by uncaughtException?
ErrorManager.getDefault().notify(t);
} finally {
synchronized (this) {
finished = true;
notify ();