Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Beginner
Aug 11, 2000

Case Sensitivity

Question:
Is Java platform-dependent where the case sensitivity of filenames is concerned? In Unix, filenames are case sensitive whereas in Windows they are not. How does it work when Java is reading filenames from a directory structure?

Answer:
Java relies on the underlying platform for opening files. Therefore, the case sensitivity of filenames will be determined by the native file system. You should keep this in mind when naming files that are used by your Java applications. No two files should have the same name based on a caseless comparison. Otherwise, when you distribute your application, one file may overwrite the other on case insensitive file systems.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap