Article View: borland.public.jbuilder.java.language
Article #521Printwriter outside JBuilder
From: Magnus
Date: Wed, 15 Jun 2005 22:18
Date: Wed, 15 Jun 2005 22:18
26 lines
1792 bytes
1792 bytes
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
Technical Details
Message-ID:
<42b0a92b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!shaw.ca!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f74b3,ad9f2eda78c91665,start X-Google-Attributes: gidf74b3,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 15 Jun 2005 18:18:28 -0400 From: Magnus <magnus_bjorkman@iwon.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en, sv MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language Subject: Printwriter outside JBuilder Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 71.0.99.227 Message-ID: <42b0a92b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1118873899 71.0.99.227 (15 Jun 2005 15:18:19 -0700) Lines: 27 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!shaw.ca!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail