Hi there,
just a suggestion.
would it be possible to change the generated "abcl" shell script to not use the -cp parameter to the java executable, but set up the classpath like e.g. so
export CLASSPATH=`dirname $0`/dist/abcl.jar:$CLASSPATH
and then invoke
exec .../java org.armedbear.lisp.Main "$@"
i.e. without the -cp parameter.
This would result in the CLASSPATH environment variable that was in effect before the call to the abcl script to remain available to the lisp interpreter. i.e. jdbc driver classes etc.
apart from that I think abcl is a great great piece of software making life a lot more convenient. thanks to everyone participating!
Kindly, Matthias
On 5/12/10 9:07 PM, Matthias Cords wrote:
Hi there,
just a suggestion.
would it be possible to change the generated "abcl" shell script to not use the -cp parameter to the java executable, but set up the classpath like e.g. so
export CLASSPATH=`dirname $0`/dist/abcl.jar:$CLASSPATH
and then invoke
exec .../java org.armedbear.lisp.Main "$@"
i.e. without the -cp parameter.
This would result in the CLASSPATH environment variable that was in effect before the call to the abcl script to remain available to the lisp interpreter. i.e. jdbc driver classes etc.
I would propose the attached patch for UNIX, but we need to find the equivalent behavior under the Windows shell for which I solicit a contribution from someone who has the requisite knowledge (or time for Google and experimentation)
Some points:
1) export CLASSPATH="..." is not legal Bourne shell syntax
2) Don't export CLASSPATH unless it is already exported
3) If CLASSPATH is not set, don't leave a trailing ':' in the path
4) The absolute form of the directory should already have been set in the Ant build, so the `dirname $0` isn't necessary (and would break is abcl is symlinked)
apart from that I think abcl is a great great piece of software making life a lot more convenient. thanks to everyone participating!
Thanks, and welcome aboard!
Ping!
On Thu, May 13, 2010 at 2:26 PM, Mark Evenson evenson@panix.com wrote:
On 5/12/10 9:07 PM, Matthias Cords wrote:
Hi there,
just a suggestion.
would it be possible to change the generated "abcl" shell script to not use the -cp parameter to the java executable, but set up the classpath like e.g. so
export CLASSPATH=`dirname $0`/dist/abcl.jar:$CLASSPATH
and then invoke
exec .../java org.armedbear.lisp.Main "$@"
i.e. without the -cp parameter.
This would result in the CLASSPATH environment variable that was in effect before the call to the abcl script to remain available to the lisp interpreter. i.e. jdbc driver classes etc.
I would propose the attached patch for UNIX, but we need to find the equivalent behavior under the Windows shell for which I solicit a contribution from someone who has the requisite knowledge (or time for Google and experimentation)
Some points:
export CLASSPATH="..." is not legal Bourne shell syntax
Don't export CLASSPATH unless it is already exported
If CLASSPATH is not set, don't leave a trailing ':' in the path
The absolute form of the directory should already have been set in the
Ant build, so the `dirname $0` isn't necessary (and would break is abcl is symlinked)
apart from that I think abcl is a great great piece of software making life a lot more convenient. thanks to everyone participating!
Thanks, and welcome aboard!
Mark,
I hope your wrist is starting to do better? Or is it really broken? In that case, we might want to skype instead!
Anyway, the attached patch hasn't been applied. I have 2 remarks:
-exec @JAVA@ @ABCL_JAVA_OPTIONS@ \ - -cp @ABCL_CLASSPATH@ \ +if [ -z ${CLASSPATH} ]; then
----> I thought this should be _-z "${CLASSPATH}" to handle those cases where there are spaces in the path.
+ CLASSPATH=@ABCL_CLASSPATH@
----> I think it's customary to use lower-case variable names for non-exported variables; especially if I look at configure scripts, that's the idea I get. Using lowercase makes the script less confusing too, because then it doesn't re-assign CLASSPATH.
+else + CLASSPATH=@ABCL_CLASSPATH@:${CLASSPATH} +fi + +CLASSPATH=$CLASSPATH exec @JAVA@ @ABCL_JAVA_OPTIONS@ \ org.armedbear.lisp.Main \ "$@"
Agreed?
Bye,
Erik - who can create the Windows variant of it.
On Jun 7, 2010, at 9:57 PM, Erik Huelsmann wrote:
[…]
I hope your wrist is starting to do better? Or is it really broken? In that case, we might want to skype instead!
It's definitely broken: radius was completely detached from the carpals. Oddly, I'm encouraged to type because it promotes healing, but I quickly tire.
Anyway, the attached patch hasn't been applied. I have 2 remarks:
-exec @JAVA@ @ABCL_JAVA_OPTIONS@ \
- -cp @ABCL_CLASSPATH@ \
+if [ -z ${CLASSPATH} ]; then
----> I thought this should be _-z "${CLASSPATH}" to handle those cases where there are spaces in the path.
Agreed: this should have surrounding double quotes.
- CLASSPATH=@ABCL_CLASSPATH@
----> I think it's customary to use lower-case variable names for non-exported variables; especially if I look at configure scripts, that's the idea I get. Using lowercase makes the script less confusing too, because then it doesn't re-assign CLASSPATH.
Yes, lowercase for non-exported variables is the convention but with the JVM classpath everyone seems to use all-caps. Extremely contrived counter example: ABCL invokes a subprocess that expects to have ABCL's jars listed in the CLASSPATH variable
But go ahead and use lowercase here: it makes our intention clearer.
+else
- CLASSPATH=@ABCL_CLASSPATH@:${CLASSPATH}
+fi
+CLASSPATH=$CLASSPATH exec @JAVA@ @ABCL_JAVA_OPTIONS@ \ org.armedbear.lisp.Main \ "$@"
[…]
Erik - who can create the Windows variant of it.
-- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now."
armedbear-devel@common-lisp.net