It's not a secret anymore!
The moose likes Java in General and the fly likes javac changes camelCase to lower case Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "javac changes camelCase to lower case" Watch "javac changes camelCase to lower case" New topic

javac changes camelCase to lower case

Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9056
I start with (which has an inneer class named Counter) and I end up with conductor.class and conductor$counter.class

It can't be a property of the drive because the java classes are camelCase and they're on the same drive.

I just ran the following command:
javac -verbose -d M:\sandbox\ETL\xtract\adm\common\classes -sourcepath M:\sandbox\ETL\xtract\adm\common\src M:\sandbox\ETL\xtract\adm\common\src\com\ibm\esmrt\adm\common\

Using the verbose flag, I see

but when I list the files (using either cygwin 'ls' or windows "dir" commands), I see
-rw-r--r-- 1 marilynd mkpasswd 744 Apr 9 00:57 conductor$counter.class
-rw-r--r-- 1 marilynd mkpasswd 2863 Apr 9 00:57 conductor.class


04/09/2008 01:03 AM 744 conductor$counter.class
04/09/2008 01:03 AM 2,863 conductor.class

Really weird. Then when the next part of the script runs, it can't find Conductor.class

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9056
It turns out that the issue is with the MVFS filesystem on Windows. Its default configuration on Windows ... Native Windows file systems preserve case on file-creation operations. The MVFS is configured to convert file names to lowercase on Windows.

It doesn't make sense to me, but there it is.
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11881

i once tried to do a build on my windows box, and everything failed. why? because all of my .java files had been converted to all lower-case. every single one.

fortunately i had not made to many changes, so doing a fresh pull to a clean directory didn't cause me to loose much, but it was one of the strangest things I've ever seen.

I also have a witness or two, if you don't believe me.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
marc weber

Joined: Aug 31, 2004
Posts: 11343

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
I agree. Here's the link:
subject: javac changes camelCase to lower case
It's not a secret anymore!