This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "javac changes camelCase to lower case" Watch "javac changes camelCase to lower case" New topic
Author

javac changes camelCase to lower case

Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9048
    
  10
I start with Conductor.java (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\Conductor.java

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

or

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


JavaBeginnersFaq
"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
Sheriff

Joined: Jul 22, 2000
Posts: 9048
    
  10
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
Bartender

Joined: Oct 02, 2003
Posts: 11444
    
  16

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
Sheriff

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
sscce.org
 
wood burning stoves
 
subject: javac changes camelCase to lower case