Hi Enrico
Does "C:\Projects\Voicemail\logs" exist?
Brian
On 12/14/05, Enrico Goosen <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi All,
>
>
>
> Can anyone give me a hand with java.util.logging please?
>
> My program spawns Threads that communicate with modems on separate ports.
>
> I would like to create a Logger for each modem.
>
> I'm trying to create the log file in my logs directory straight off user.dir
> like this:
>
> FileHandler fh = new
> FileHandler(System.getProperty("user.dir")+"\\logs\\"+key+".log");
>
>
>
> But I get this Exception when I run my program:
>
>
>
> java.io.FileNotFoundException:
> C:\Projects\Voicemail\logs\COM1.log (Access is denied)
>
> at java.io.FileOutputStream.open(Native Method)
>
> at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
>
> at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
>
> at
> java.util.logging.FileHandler.open(FileHandler.java:156)
>
> at
> java.util.logging.FileHandler.rotate(FileHandler.java:535)
>
> at
> java.util.logging.FileHandler.openFiles(FileHandler.java:423)
>
> at java.util.logging.FileHandler.<init>(FileHandler.java:237)
>
> at com.saicom.voicemail.App.<init>(App.java:113)
>
> at com.saicom.voicemail.App.main(App.java:146)
>
>
>
> Very annoying…
>
>
>
> Enrico Goosen
>
> Software Developer
>
> SAICOM TECHNOLOGY
>
> TEL: +2721 555 0726
>
> FAX: +2721 555 0821
>
> CEL: +2783 305 5676
>
> EMAIL: [EMAIL PROTECTED]
>
>
--
Brian Silberbauer
Consultant
+27 (0)83 566 2705
skype: brian.silberbauer