• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 553
  • Last Modified:

JFileChooser Mac and Windows compatibility (also on file separators)

Hi. I am currently making an applet that uses a JFileChooser. It's supposed to work on both Mac and Windows OS. I just would like to know if JFileChooser is compatible with both operating systems (like, it automatically takes care of the file name format differences and such). I dont really know anything about Mac OS though.

One more question, In the file chooser, the user may be allowed to choose more then one file. I would like to know what is the standard file name separator for Windows and for Mac if any or what would you recommend?

Thank you very much in advance. I need all the help I can get =)
0
animor
Asked:
animor
  • 2
1 Solution
 
jimmackCommented:
JFileChooser should work on any Java platform.

Use File.separator in your filenames.
0
 
animorAuthor Commented:
Thanks for the tip. I checked the File API and realized that what I needed was the pathSeparator variable. Thanks again.
0
 
jimmackCommented:
Ah.  Yes sorry ;-)

and thanx ;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now