Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do java support filenames with space between?

 
Manoj Paul
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends..

Do java support filenames with space between?

Actually in my application when a user selects a folder what happens is that those files whose filename has a space between (e.g Good Boy.jpg ) is not shown on the display panel... but those with no problem as such (e.g GoodBoy.jpg, or Good_Boy.jpg) is clearly shown on the display panel...

Please Guide...
Thank you
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If value is a string that contains spaces, then try this with enclose the string in double quotes.

hope it works.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

This post has been moved to a more appropriate forum.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15366
40
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Java supports file names with spaces in them. If you don't see them correctly in your application, then that's most likely a bug in your application and not a bug in Java.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic