BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using JDK 1.4.1_02 with JBuilder 2005

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE
View previous topic :: View next topic  
Author Message
smetzger
Guest





PostPosted: Tue Jun 28, 2005 3:26 pm    Post subject: Using JDK 1.4.1_02 with JBuilder 2005 Reply with 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?

Thanks,
Scott


Back to top
Kevin Dean [TeamB]
Guest





PostPosted: Tue Jun 28, 2005 6:24 pm    Post subject: Re: Using JDK 1.4.1_02 with JBuilder 2005 Reply with quote



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





PostPosted: Tue Jun 28, 2005 7:18 pm    Post subject: Re: Using JDK 1.4.1_02 with JBuilder 2005 Reply with quote




"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





PostPosted: Tue Jun 28, 2005 9:29 pm    Post subject: Re: Using JDK 1.4.1_02 with JBuilder 2005 Reply with quote

smetzger wrote:

Quote:
Yes, it is and it compiles fine with our old version of Together.

See my post in non-technical regarding help for Together.

--
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
Kevin Dean [TeamB]
Guest





PostPosted: Tue Jun 28, 2005 9:31 pm    Post subject: Re: Using JDK 1.4.1_02 with JBuilder 2005 Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder IDE All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.