Skip to Main Content

Java Programming

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Folders that having non-ascii chars are not displaying on MAC using JFileChooser

875776Jul 15 2013 — edited Jul 15 2013

On MAC OS X 10.8.2, I have latest Java 1.7.25 installed. When I run my simple java program which allows me to browse the files and folders of my native file system using JFileChooser, It does not show the folders that having non-ascii char in there name. According this link, this bug had been reported for Java 7 update 6. It was fixed in 7 Update 10. But I am getting this issue in Java 1.7.21 and Java 1.7.25.

Sample Code-

{code}

public class Encoding {

public static void main(String[] arg) {

try {

//NOTE : Here at desktop there is a folder DKF}æßj having spacial char in its name. That is not showing in file chooser as well as while is trying to read for FILE type, it is not identify by Dir as well as File - getting File Not Found Exception

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

} catch (IllegalAccessException ex) {

Logger.getLogger(Encoding.class.getName()).log(Level.SEVERE, null, ex);

} catch (UnsupportedLookAndFeelException ex) {

Logger.getLogger(Encoding.class.getName()).log(Level.SEVERE, null, ex);

} catch (ClassNotFoundException ex) {

Logger.getLogger(Encoding.class.getName()).log(Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

Logger.getLogger(Encoding.class.getName()).log(Level.SEVERE, null, ex);

}

JFileChooser chooser = new JFileChooser(".");

chooser.showOpenDialog(null);

}

}

{code}

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2013
Added on Jul 15 2013
1 comment
365 views