Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

JFileChooser Mac and Windows compatibility (also on file separators)

Posted on 2003-11-19
3
Medium Priority
?
531 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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 tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

688 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