|
Attaching a patch 'd2501_v1.diff', which modifies the following file in trunk:
M bin\derby_common.bat The patch renames the "noAntHome" label to "noDerbyHome" and goes to the label "endcommon" instead of the non-existing "end" after the noDerbyHome error message is displayed. This eliminates error message 2). This patch does not do anything with error message 3), as I am not sure what the best way to handle this is. It could be removed by adding a check for _JAVACMD in all the scripts that call derby_common.bat, or perhaps by letting the derby_common.bat script call the "end" label of the parent scripts directly, but I fear that the latter option might be unnecessarily complicated to implement. Any comments or suggestions are appreciated! Please review / commit this simple patch.
John H. Embretsen made changes - 29/Mar/07 09:54 AM
John H. Embretsen made changes - 29/Mar/07 09:56 AM
John H. Embretsen made changes - 29/Mar/07 09:56 AM
John H. Embretsen made changes - 29/Mar/07 11:29 AM
John - can we also expand the message that the user sees?
Perhaps to something like: DERBY_HOME is set incorrectly or the derby.jar file could not be located. Set the DERBY_HOME environment variable to the path where you installed Derby. Attaching new patch (d2501_v2.diff) incorporating Laura's suggestion. Error message 1) is now displayed on (at least) two lines:
DERBY_HOME is set incorrectly or derby.jar could not be located. Please set the DERBY_HOME environment variable to the path where you installed Derby. Please review the new patch instead of the old one.
John H. Embretsen made changes - 29/Mar/07 03:25 PM
Attaching a patch which includes the check that _JAVACMD is set in the scripts where appropriate to prevent the last unnecessary error message. In most cases, it is expected that java.exe will be in your path on Windows, or if you don't want the last JDK / JRE you installed via a Windows installer, you should set JAVA_HOME.
Andrew McIntyre made changes - 26/Apr/07 10:51 PM
I have verified that the latest patch, derby-2501-check-javacmd.diff, will remove all unnecessary error messages mentioned in this Jira issue. I also verified that the default Java path can be overridden by setting JAVA_HOME. Tested on Win XP Pro, using JDK 1.4.2_12 and Java SE 6 (1.6.0) (default).
I think this patch is ready for commit.
Thanks for the review, John! Committed -javacmd patch with revision 535039.
Andrew McIntyre made changes - 04/May/07 12:31 AM
Thank you very much for the final patch work and the commit, Andrew!
I have verified the change by trying out a few of the scripts on Win XP.
John H. Embretsen made changes - 08/May/07 07:28 PM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The label for reporting invalid DERBY_HOME should be renamed from "noAntHome" to "noDerbyHome", as these scripts have nothing to do with Ant.
Error message 3) is caused by the _JAVACMD variable not being set (so the scripts execute "" instead of for example "c:\java6\bin\java") if DERBY_HOME is invalid.
[1] http://www.nabble.com/Re%3A-Setting-the-environment-variables-for-Derby-p9720589.html