Try Titlecase class name first when launching programs

On case insensitive filesystems like Mac OS X's HFS+ or Windows NTFS
if Gerrit is started out of the classes directory through an IDE
debugger we would find "daemon.class" on disk and try to load it,
but the JVM refuses because "daemon" is not the actual class name,
its "Daemon".  Meanwhile running out of a JAR or on Linux always
works, because the JAR and ext2/3/4 are case sensitive.

Flip the order of operations around and try the Titlecase form of
the command name first.  Its more likely going to be a match for
a Java classname, since developers name classes in CamelCaseFormat.

Bug: issue 490
Change-Id: I43a487eb0d5d528ac370e1794a4542e412236307
Signed-off-by: Shawn O. Pearce <sop@google.com>
1 file changed