My java project has files which have same name but different cases (Test.java & test.java). I have setup a case sensitive file system on my mac and am able to view/edit them via CLI. However, Intellij Idea does not regard them as different and compilation fails. How can I fix Intellij Idea to honor cases for a file name?
Thanks
Answer: A: No. MacOS is not a case sensitive file system by default. So you can't have two files named File.
Both macOS and Windows generally provide and present case-preserving but case-insensitive names.
From the main menu, select Edit | Find | Find in Files Ctrl+Shift+F . In the search field, type your search string. Alternatively, in the editor, highlight the string you want to find and press Ctrl+Shift+F . IntelliJ IDEA places the highlighted string into the search field.
I filed a support request at JetBrains. Here is the answer:
add "idea.case.sensitive.fs=true" to bin/idea.properties file (https://intellij-support.jetbrains.com/entries/23395793 ), perform File | Invalidate Caches and restart the IDE.
It solved the issue for me.
update: 2015-02-14 / Idea 14.0.3
It is no longer sufficient to add the property to the idea.properties file. Add -Didea.case.sensitive.fs=true
to "Settings | ... | Java Compiler | Additional command line parameters".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With