Can't make folder - "Invalid name on this platform"

I was working in eclipse on a little Android project, and was going to make a subfolder "aux" of an existing folder, the name reflecting that the folder would contain auxiliary classes.  But eclipse would refused to create this folder, giving me this message:

'aux' is an invalid name on this platform

huh?

I was thinking that this was a message from the Android plugin, but it is actually a core eclipse message.  The issue is that on Windows you can't have files or folders with the names "aux", "con", "prn", "nul", "comN", or "lptN" (http://en.wikipedia.org/wiki/Filename).

Non-Windows operating systems do not seem to have these restrictions.  This is something that could really burn a little time if you were originally working on Linux and had created a package with one of these names somewhere in it, and then a user/colleague tries to work on Windows with your code.

Or, as this guy noted, it's one way to make sure your java code won't get run on Windows.

No comments:

Post a Comment

Popular Posts