DERBY-6410: ClassCastException when launching derby from windows subst drive

Merged revision 1585407 from trunk and manually resolved conflicts.


git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/branches/10.10@1592486 13f79535-47bb-0310-9956-ffa450edef68