{"id":4892,"date":"2014-03-30T16:28:10","date_gmt":"2014-03-30T16:28:10","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-avoid-filenotfound-exception-when-running-java-on-linux-because-of-case-sensitiveness-collection-of-common-programming-errors\/"},"modified":"2014-03-30T16:28:10","modified_gmt":"2014-03-30T16:28:10","slug":"how-to-avoid-filenotfound-exception-when-running-java-on-linux-because-of-case-sensitiveness-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-avoid-filenotfound-exception-when-running-java-on-linux-because-of-case-sensitiveness-collection-of-common-programming-errors\/","title":{"rendered":"How to avoid FileNotFound exception when running Java on Linux because of case sensitiveness?-Collection of common programming errors"},"content":{"rendered":"<p>Well, first of all I think you <em>should<\/em> consider moving to a consistent naming scheme, rather than to use some workaround.<\/p>\n<p>Anyway, what about <strong>reading in all file names and putting them into a map<\/strong> that contains the lower-case name as a key? You can then <strong>look up the correct file name from the map<\/strong>.<\/p>\n<p>This would also allow you to detect a conflict, e.g. two files &#8220;FileA.txt&#8221; and &#8220;FILEA.TXT&#8221; in the same directory that have the same lower-case representations, in which case you know that you have to tackle the problem in a completely different way (because you have to know which one you want to have opened, and it&#8217;s ambiguous, and such a workaround won&#8217;t do it then).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, first of all I think you should consider moving to a consistent naming scheme, rather than to use some workaround. Anyway, what about reading in all file names and putting them into a map that contains the lower-case name as a key? You can then look up the correct file name from the map. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4892","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4892"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4892\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}