Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Any standard way of making sure a file name is valid

843810Oct 24 2006 — edited Jun 27 2007
Hi everyone,
I would like to say thanks to all who participate in this forum because it is one of the most important part of the java community.

I am having some problems with a desktop application that am workin on at this time. Having a small window that allows the user of the application to use a JFileChooser to choose a directory (Directory only option enabled) where they want to store there file and also a JTextField that allows the user to enter the file name they wish the file to be called, I am having problem when the user enters a file name with characters that are not allowed in a file.

I was wondering if there is a standard way of validating file names across several platform or does anybody have any tips and tricks for getting around this problem.

Thanks in advance

Franklini
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2007
Added on Oct 24 2006
10 comments
1,131 views