Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Case sensitive files in IntelliJ Idea on Mac OSX

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

like image 794
Satadru Biswas Avatar asked Sep 20 '14 11:09

Satadru Biswas


People also ask

Is macOS filesystem case-sensitive?

Answer: A: No. MacOS is not a case sensitive file system by default. So you can't have two files named File.

Are directory names case-sensitive on Mac?

Both macOS and Windows generally provide and present case-preserving but case-insensitive names.

How do I search text in IntelliJ Mac?

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.


1 Answers

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".

like image 156
user3670285 Avatar answered Oct 20 '22 20:10

user3670285