How can I make OS X recognize drive letters?

后端 未结 7 1646
长情又很酷
长情又很酷 2021-01-20 23:11

I know. Heresy. But I\'m in a bind. I have a lot of config files that use absolute path names, which creates an incompatibility between OS X and Windows. If I can get OS X (

7条回答
  •  时光取名叫无心
    2021-01-21 00:05

    Most likely you'd have to provide a different java.io.File implementation that can parse out the file paths correctly, maybe there's one someone already made.
    The real solution is to put this kind of stuff (hard-coded file paths) in configuration files and not in the source code.

提交回复
热议问题