Home arrow static arrow Java Programming [Archive] - try-catch
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - try-catch
This topic has 26 replies on 2 pages.    « Previous | 1 | 2 |

Posts:2,206
Registered: 8/15/02
Re: try-catch  
Jul 29, 2004 1:20 PM (reply 15 of 26)



 
Is the method private void deleteSelectedJobHistoryButtonActionPerformed(java.awt.event.ActionEvent evt) the next method in the file aftwer the one shown? If so it does point to a brackets problem, but I don't see it.
 

Posts:2,206
Registered: 8/15/02
Re: try-catch  
Jul 29, 2004 1:22 PM (reply 16 of 26)



 
Bah, morgaier is correct; replace }); with };
 

Posts:2,206
Registered: 8/15/02
Re: try-catch  
Jul 29, 2004 1:23 PM (reply 17 of 26)



 
******, no it's not that....
 

Posts:54
Registered: 04-06-18
Re: try-catch  
Jul 29, 2004 1:27 PM (reply 18 of 26)



 
THANK YOU MORGALR. THAT WORKED!
 

Posts:1,025
Registered: 04-03-17
Re: try-catch  
Jul 29, 2004 1:34 PM (reply 19 of 26)



 
I put this in a Test class (reformatted of course) and it compiles for me. I did have to comment out a few lines (none with {}'s or ( )'s though) to get it to compile, but it came out clean. My guess is that it's somewhere else, since the first error that you gave is referring to
private void deleteSelectedJobHistoryButtonActionPerformed
which is nowhere in the code you supplied.
 

Posts:1,025
Registered: 04-03-17
Re: try-catch  
Jul 29, 2004 1:35 PM (reply 20 of 26)



 
HOLY SMOKES WAS I LATE ON THAT OR WHAT?!?!?

Did it really take me that long to type? Jeesh!
 

Posts:1,025
Registered: 04-03-17
Re: try-catch  
Jul 29, 2004 1:48 PM (reply 21 of 26)



 
Just before your catch you have a spare ");" stuff
between quotes--closing paren and semicolon. The
semicolon isn't a big deal, but an extra closing paren
will cause great problems.

I'm not sure that this is the problem. Isn't the " }); " needed to close the invokeAndWait method?

From your original post, you have:
}});}
right? The first curly closes
public void run()
. The curly-paren-semi closes
javax.swing.SwingUtilities.invokeAndWait(...
and the lst curly closes your try statement. I'll stand by my first guess that it's somewhere else.
 

Posts:2,206
Registered: 8/15/02
Re: try-catch  
Jul 29, 2004 1:52 PM (reply 22 of 26)



 
Dat's what I thought. I checked all the braces and brackets and they all semmed to match up pretty good. But hell, if it works for him...
 

Posts:3,534
Registered: 9/30/99
Re: try-catch  
Jul 29, 2004 4:22 PM (reply 23 of 26)



 
Ever since I was in the computer lab in college at 1:30 AM with a compile error that just refused to go away, I've been very keen to look at the little things--like a spare looking closing paren.

As it turned out in College, I had used tabs for my white space. Tabs were a completely legal white space for my Microsoft compilers and also the Schools Compilers that I had used up to that point, but it turned out that tabs, eventually confused the compiler enough to just generate random compile errors. I finally figured it out by saying: OK, I know I am right, so what else could be wrong? I stripped out all the white space and recompiled the ugly mass and it worked perfectly! Of course I put the tabs back in for making it pretty and it died again lol after all it was about 3 AM them.
 

Posts:13,769
Registered: 00-11-29
Re: try-catch  
Jul 30, 2004 5:50 AM (reply 24 of 26)



 
but it
turned out that tabs, eventually confused the compiler
enough to just generate random compile errors.

What compiler can't handle tabs?
 

Posts:3,534
Registered: 9/30/99
Re: try-catch  
Jul 30, 2004 7:57 AM (reply 25 of 26)



 
It was a C compiler on an HP-3000 mini. I cannot remember the actual compiler that was used, and it was so long ago that it wouldn't make any difference now which one it was any way.

The compile errors would move around according to the state of the compiler buffers when you started you compile: it was truely the strangest error generation that I have ever encountered (especially since the source was correct).
 

Posts:13,769
Registered: 00-11-29
Re: try-catch  
Jul 30, 2004 8:01 AM (reply 26 of 26)



 
It was a C compiler on an HP-3000 mini. I cannot
remember the actual compiler that was used, and it was
so long ago that it wouldn't make any difference now
which one it was any way.

The compile errors would move around according to the
state of the compiler buffers when you started you
compile: it was truely the strangest error generation
that I have ever encountered (especially since the
source was correct).

And I thought it was bad when stack traces point to the wrong line numbers.
 
This topic has 26 replies on 2 pages.    « Previous | 1 | 2 |