> My backup program is intended to work on both Apple OS X and Windows.
> It happily reads and writes files on both systems, except when writing
[quoted text clipped - 8 lines]
> FYI it's a Dell 500m with Windows XP SP2, and the CD drive seems to be
> managed by Roxio.
> Check the stack trace. Can you tell us what method and class the exception
> originates from?
Oliver, here is the stack trace:
java.io.IOException: The parameter is incorrect
at java.io.WinNTFileSystem.canonicalize(Native Method)
at java.io.File.getCanonicalPath(Unknown Source)
at Saver.getPrintablePath(Saver.java:243)
at Saver.copyFile(Saver.java:208)
at Saver.scanFolder(Saver.java:146)
at Saver.scanFolder(Saver.java:140)
at Saver.<init>(Saver.java:54)
at Saver.main(Saver.java:32)
I haven't yet found any documentation about java.io.WinNTFileSystem -
perhaps my ignorance is showing. But Ben, if this is not a java
programming question, what is it? I don't think this has to do with
burning, in the sense that the burn option comes up only after I've
written my files to the (as yet uncommitted) blank CD. It's java code
that works on Apple but not on Windows, but Microsoft seems unlikely to
help. Please tell me of a more relevant newsgroup. Thanks.
Composer - 26 Jun 2006 23:19 GMT
By the way, I get the same error whether I direct my output to D:\ or
to D:\backup\
Chris Uppal - 27 Jun 2006 11:18 GMT
> java.io.IOException: The parameter is incorrect
> at java.io.WinNTFileSystem.canonicalize(Native Method)
[quoted text clipped - 8 lines]
> I haven't yet found any documentation about java.io.WinNTFileSystem -
> perhaps my ignorance is showing.
WinNTFileSystem is part of the private platform-specific stuff which underlies
the public file system APIs in Java. There's a different version for each OS
which uses that OSes native file-related APIs.
So, what I think is happening here is that you have a Windows system (which
AFAIK doesn't know about file-systems on "blank" writable CDs), which has been
enhanced with a third-party add on. That add-on is a kernel-level custom file
system which makes a blank CD look like a writable disk. Now the Java code in
WinBTFileSystem is using the normal Win32 APIs, and is using the
Windows-specific code which it normally uses (which is primarly _fullpath()
plus FindFirstFile() and its friends -- considerably complicated by, e.g. UNC
names, and so on). But apparently that code doesn't work on your third-party
filesystem. That could be because of faulty code in the Java native
implementation, or it's because the third party file-system isn't implemented
completely correctly.
On the whole, I think it's more likely that the problem is in the custom
file-system, but I wouldn't rule out an error in either party's code -- or even
in both ;-)
But whichever is the case, I think you'll have to find some sort of workaround.
Maybe a different vendors' CD burner would work better. Perhaps your code
would work if you use UNC filenames instead of "classic" filenames (or the
other way around). Perhaps you can just code around the error.
-- chris