Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

JFileChooser Mac and Windows compatibility (also on file separators)

Posted on 2003-11-19
3
Medium Priority
?
542 Views
Last Modified: 2011-09-20
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
Comment
Question by:animor
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
jimmack earned 60 total points
ID: 9779919
JFileChooser should work on any Java platform.

Use File.separator in your filenames.
0
 

Author Comment

by:animor
ID: 9780508
Thanks for the tip. I checked the File API and realized that what I needed was the pathSeparator variable. Thanks again.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9780596
Ah.  Yes sorry ;-)

and thanx ;-)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.
Suggested Courses

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question