 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
smetzger Guest
|
Posted: Tue Jun 28, 2005 3:26 pm Post subject: Using JDK 1.4.1_02 with JBuilder 2005 |
|
|
I am posting here becuase I think this is an IDE issue with setting up my project.
I have a fairly large project that is presently compiling in Together 6.0.1 and uses JDK 1.4.1_02. I am trying to build it in JBuilder 2005 but I am getting a compiler error:
"LoggingService.java": unreported exception java.io.IOException; must be caught or declared to be thrown at line 288, column 49
Here is the line:
new FileOutputStream(console_log.toString(), append_mode), true);
I did change the JDK to point to my JDK 1.4.1_02 directory.
Any ideas?
Thanks,
Scott
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Tue Jun 28, 2005 6:24 pm Post subject: Re: Using JDK 1.4.1_02 with JBuilder 2005 |
|
|
smetzger wrote:
| Quote: |
I am posting here becuase I think this is an IDE issue with setting
up my project.
I have a fairly large project that is presently compiling in Together
6.0.1 and uses JDK 1.4.1_02. I am trying to build it in JBuilder
2005 but I am getting a compiler error: "LoggingService.java":
unreported exception java.io.IOException; must be caught or declared
to be thrown at line 288, column 49
Here is the line:
new FileOutputStream(console_log.toString(), append_mode), true);
I did change the JDK to point to my JDK 1.4.1_02 directory.
Any ideas?
|
The error message you're seeing is correct: that statement could throw
IOException, which you need to handle. Do you have it surrounded with
a try/catch statement?
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
smetzger Guest
|
Posted: Tue Jun 28, 2005 7:18 pm Post subject: Re: Using JDK 1.4.1_02 with JBuilder 2005 |
|
|
"Kevin Dean [TeamB]" <NkOdSePaAnM (AT) datadevelopment (DOT) com> wrote:
| Quote: | The error message you're seeing is correct: that statement could throw
IOException, which you need to handle. Do you have it surrounded with
a try/catch statement?
|
Yes, it is and it compiles fine with our old version of Together.
code snippet...
try
{
PrintStream out = new LogPrintStream(new FileOutputStream(console_log.toString(), append_mode), true);
System.setOut(out);
System.setErr(out);
}
catch (FileNotFoundException ex)
{
// won't be able to redirect output to a log file
ex.printStackTrace();
}
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Tue Jun 28, 2005 9:31 pm Post subject: Re: Using JDK 1.4.1_02 with JBuilder 2005 |
|
|
smetzger wrote:
| Quote: | Yes, it is and it compiles fine with our old version of Together.
|
On further inspection, your problem is that something in that line,
probably an upgraded LogPrintStream and not FileOutputStream, is
throwing IOException.
FileNotFoundException is derived from IOException and is not sufficient
to catch all IOExceptions.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|