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

Swing GUI program exits unexpectedly without throwing an exception

P: n/a
Please help me diagnose the following problem. I have a Swing program
(running under 1.4.2_04) that uses JNI to get some hardware-level
information and return that info as a csv String. The String returns and I
am able to run .split() on it. At some point after that (this seems to
vary), my program simply exits during the middle of execution. I've
peppered the code with println() statements and the program appears to be
exiting after a successful println() and before entering a method call.
The first line of code in the method is another println() statement, but
that println() is never making it back to the console. I am using "java -
jar blah" to execute the program. When I use Ant to start the program, it
still exits in this fashion, but Ant prints a line telling me "Java Result:
128". If you wish, email me at hankgay AT integra-soft DOT com. TIA.

Hank
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
The first thing to do is, place this code between a try catch block,
then print the stack trace in the exception block
Hank wrote:
Please help me diagnose the following problem. I have a Swing program
(running under 1.4.2_04) that uses JNI to get some hardware-level
information and return that info as a csv String. The String returns and I
am able to run .split() on it. At some point after that (this seems to
vary), my program simply exits during the middle of execution. I've
peppered the code with println() statements and the program appears to be
exiting after a successful println() and before entering a method call.
The first line of code in the method is another println() statement, but
that println() is never making it back to the console. I am using "java -
jar blah" to execute the program. When I use Ant to start the program, it
still exits in this fashion, but Ant prints a line telling me "Java Result:
128". If you wish, email me at hankgay AT integra-soft DOT com. TIA.

Hank


Jul 17 '05 #2

P: n/a
I've got the try{} catch{} blocks (sorry if I failed to make that clear),
but the e.printStackTrace() and System.out.println() are not printing
anything to the console, so either it's dying without throwing an exception
or the output has been rerouted, which I didn't do.

Hank

kevinc <ke****@elp.rr.com> wrote in
news:BO******************@fe2.texas.rr.com:
The first thing to do is, place this code between a try catch block,
then print the stack trace in the exception block

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.