Before running this script, you should either set the DERBY_INSTALL environment variable or modify the script so that DERBY_INSTALL points to the directory in which you installed the Derby database.
The difference between changing a console variable to get a different behavior versus running an old exe, let alone reverting code changes and rebuilding, is significant.