By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,346 Members | 2,318 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,346 IT Pros & Developers. It's quick & easy.

Runtime.getRuntime.exec question

P: n/a
uni
I have the following

Process o = Runtime.getRuntime.exec("java stuff",en);
where en is -f CH-ResultsDB.. picked that up somewhere,
anyways
this code is run in a thread and i would like it to run every hour or so.
The program that is called is a popupwindow which asks for some information
from the user which then is send on to a server.
But the problem is when i run the program by itself so not via the runtime
command it works fine, but when i run it with a thread it sleeps before a
user has time to fill out the form and therefore crashes, i dont get a error
messgae but it doesnt seem to respond anymore...

Any ideas?

Erik
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
uni
edit: The program doesnt crash however the window that is called up( the
form) doesnt respond anymore after i try to send the information. The thread
runs like normal
And when i run the program alone it works fine.
Jul 17 '05 #2

P: n/a
uni
found out some more.... the program which is called crashes when i try
establish the socketconnection. again when i run it by itself it works
fine... is there a way so that i can have two extends at the end, the reason
why i have two programs at the moment is becuase one is extends JFrame and
the other extends Thread...
Might it have to do with the fact that the thread is alredy asleep? if yes
how might i prevent for the first program to continue until the called
program is done?

Erik
Jul 17 '05 #3

P: n/a
not sure I understand all the details
of your question (might help if you
post some snippets of your code) but
just in case your problem turns on
this point I am wondering if you would
want to try defining one class to
extend JFrame and implement Runnable,
rather than having two classes extending
JFrame and Thread?

"uni" <s0******@sms.ed.ac.uk> wrote in message news:<c1**********@scotsman.ed.ac.uk>...
is there a way so that i can have two extends at the end, the reason
why i have two programs at the moment is becuase one is extends JFrame and
the other extends Thread...

Jul 17 '05 #4

P: n/a
He could just use "extends JFrame implements Runnable", then pass the object
to a "new Thread(Runnable)" (Sorry, original post is gone)

Jeff

"Joseph" <IL*****@unchance.net> wrote in message
news:64**************************@posting.google.c om...
not sure I understand all the details
of your question (might help if you
post some snippets of your code) but
just in case your problem turns on
this point I am wondering if you would
want to try defining one class to
extend JFrame and implement Runnable,
rather than having two classes extending
JFrame and Thread?

"uni" <s0******@sms.ed.ac.uk> wrote in message

news:<c1**********@scotsman.ed.ac.uk>...
is there a way so that i can have two extends at the end, the reason
why i have two programs at the moment is becuase one is extends JFrame and the other extends Thread...

Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.