Why wont my program run? Maybe an issue with gcj?
Martin Willemoes Hansen
mwh@sysrq.dk
Fri Jan 4 03:32:00 GMT 2002
Hi there!
Im trying to run this program, it compiles okay with
gcj --main=Reminder Reminder.java -o Reminder, but when I run it I get
this err.
libgcj failure: only thread already running
Aborted
Oh why can this happen ;) .. Umh I am not subscribed to this list, so
please mail me directly.
import java.util.Timer;
import java.util.TimerTask;
public class Reminder {
Timer timer;
public Reminder (int seconds) {
timer = new Timer();
timer.schedule (new RemindTask(), seconds * 1000);
}
class RemindTask extends TimerTask {
public void run() {
System.out.println ("Time is up!");
timer.cancel();
}
}
public static void main (String[] args) {
new Reminder (Integer.parseInt (args[0]));
System.out.println ("Task scheduled.");
}
}
--
Martin Willemoes Hansen
--------------------------------------------------------
E-Mail mwh@sysrq.dk Website mwh.sysrq.dk
IRC MWH, openprojects
--------------------------------------------------------
More information about the Java
mailing list