File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Computer crash

 
Ayo Ayo
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I know I am quite to new Java Programming, hence the reason why my computer crashes often when I compile some programs. However is there any Java statemnet you can use that tells the compiler to send out an error message and aborting rather than the computer crashing? I tried using the 'throws IOException'in the main method but it does not work. Thank you.

Ayo
 
Norm Radder
Ranch Hand
Posts: 707
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a lot of kinds of "Computer crash"es. What kind are you experiencing?
What OS are you on?
Do you get an error message from a Java applicatoin or is it an OS error message?
If its a Java error message, please copy the text and paste it here.
The more info we have will help in solving the problem.

The try{}catch(){} statement is for problems within a program and usually has nothing to do with what I'd call a computer crash which I associate with the OS. Because Java is interpreted, problems in your code are usually handled by the JVM and will throw some kind of error or exception that your program can then handle by using a try/catch. Most of these will NOT cause a computer crash.

I'm running on Win98 and I have computer crashes (OS freezes and I have to reboot) about 4 times a week when I'm running different java version 1.4.2 programs. I have yet to find a way to keep this from happening. The crash is very dynamic: the screen goes black on the left hand side and red on the right and flashes. The keyboard is dead and often I have to power off/on to reboot my system.
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Norm Radder:
I'm running on Win98 and I have computer crashes (OS freezes and I have to reboot) about 4 times a week when I'm running different java version 1.4.2 programs. I have yet to find a way to keep this from happening. The crash is very dynamic: the screen goes black on the left hand side and red on the right and flashes. The keyboard is dead and often I have to power off/on to reboot my system.

Wow! I never experienced that while running a Java program on Win9x. Are these Java programs that you've written yourself?
[ September 05, 2005: Message edited by: Marilyn de Queiroz ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> I'm running on Win98 and I have computer crashes (OS freezes and I have to
> reboot) about 4 times a week when I'm running different java version 1.4.2
> programs.

Ditto - every time I tried a new version of 1.4.2_xx.

The only way to solve it was to re-install 1.4.0_01 (never a problem)
 
Norm Radder
Ranch Hand
Posts: 707
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael,
Exactly.
I was hoping the 1.4.2_08 would be better, but no luck.

Some feature in a program I downloaded requires 1.4.2 (can't remember specifics) so I am giving it a try. Perhaps I could have 2 JRE or SDKs, one that works on Win98 and one for the program that needs it.

Also I get a LOT of error logs (56 since July 7 2005) with EXCEPTION_ACCESS_VIOLATION and they all reference C:\WINDOWS\SYSTEM\IMAGEHLP.DLL.

I've copied that dll from my XP system to the Win98 to see what happens. Nothing yet after about 3 hours.
 
Rick O'Shay
Ranch Hand
Posts: 531
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know this cannot be the case but please clarify: you are not downloading binary programs from who-knows-where and running them, right?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my case (also Imagehlp.dll), the crashes can be when compiling or
running a self-written program, clicking on a web-site, just about anything
can trigger the three-finger-salute.
 
Layne Lund
Ranch Hand
Posts: 3061
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ayo Ayo:
Hello all,

I know I am quite to new Java Programming, hence the reason why my computer crashes often when I compile some programs. However is there any Java statemnet you can use that tells the compiler to send out an error message and aborting rather than the computer crashing? I tried using the 'throws IOException'in the main method but it does not work. Thank you.

Ayo


I find this a little strange. The Java programs I write rarely crash my computer. In fact, this is one of the nice things I like about Java. In C++, it was common to reboot my computer every 5 minutes because of a stray pointer that caused it to crash. But I digress. Can you please provide some more details about what happens when your computer crashes? Are you running a program that you wrote yourself? Where did you get the JDK that you are using? What OS are you running?

These kinds of details will help us be able to answer your question more easily or at least give us a better starting point to help you in the right direction.

Layne
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic