Article View: borland.public.jbuilder.java.language
Article #522Re: Printwriter outside JBuilder
From: Alexey N. Solofnenko
Date: Wed, 15 Jun 2005 22:36
Date: Wed, 15 Jun 2005 22:36
38 lines
2099 bytes
2099 bytes
PrintWriter masks all exceptions, so maybe your program is still
running, but the logging has stopped. It can happen, if your local hard
drive is out of space, but disk F: has plenty of space.
- Alexey.
Magnus wrote:
> Hi,
>
> Within JBuilder developing and testing I had the following:
>
> logFile = new PrintWriter(new FileWriter("./logs/"+filename,true));
>
> This worked great and all logs were created and all in my "logs" directory.
>
> Now, copy my jar, db files, etc. to a new directory (test-dir) and my
> app sometimes just hang ... I noticed it when trying to read the serial
> port since I log what I read. I could not figure it out until I tested
> to print a log before and after my init of the reading process. Nothing
> is printed.
>
> Just to test I change the line to:
>
> logFile = new PrintWriter(new
> FileWriter("F:/MyTestDir/TesData/"+filename,true));
>
> And now it works like a charm ...
>
> Why would I need an absolute path outside JBUilder but not within?
>
> As always, I'm grateful for any and all help.
>
> Magnus
>
--
Alexey N. Solofnenko {trelony at gmail.com}
home: http://trelony.cjb.net/
Technical Details
Message-ID:
<42b0ad74$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<42b0a92b@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,ad9f2eda78c91665 X-Google-Attributes: gidf74b3,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 15 Jun 2005 15:36:37 -0700 From: "Alexey N. Solofnenko" <trelony@mail.ru> User-Agent: Mozilla Thunderbird 1.0+ (Windows/20050615) MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language Subject: Re: Printwriter outside JBuilder References: <42b0a92b@newsgroups.borland.com> In-Reply-To: <42b0a92b@newsgroups.borland.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 208.200.221.5 Message-ID: <42b0ad74$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1118874996 208.200.221.5 (15 Jun 2005 15:36:36 -0700) Lines: 38 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail