On 2020/07/30 23:25:14, "Gene B. Gragg" <[email protected]> wrote: > Any attempt to invoke ANY of the shell scripts in apache-jena-3.16.0/bin, > for example, 'bin/sparql --version', yields:> > Error: Could not find or load main class > 1.jena.apache-jena-3.16.0.log4j2.properties> > But if in the scripts I comment out the line:> > LOGGING="${LOGGING:--Dlog4j.configurationFile=file:$JENA_HOME/log4j2.properties}"> > there is no problem, and 'bin/sparql --version' correctly yields:> > Jena: VERSION: 3.16.0> > Jena: BUILD_DATE: 2020-07-09T16:13:45+0000> > > Note that the environment variable $JENA_HOME has been correctly set:> > 'echo $JENA_HOME' correctly yields '/Users/GeneGragg > 1/jena/apache-jena-3.16.0',> > and 'cd $JENA_HOME' correctly puts me in 'apache-jena-3.16.0 %'> > > Is it a problem that my home directory, /Users/GeneGragg 1/, contains a > space?> > > (I am using macOS Catalina, and the zsh shell [but the same things happens if > I use bsh])> > > > > Gene Gragg> > University of Chicago> > Professor (Oriental Institute, Linguistics, NELC)> > Oriental Institute> > 1155 E. 58th St.> > Chicago IL 60637> > Tel: (773) 307-7486> > Fax: (773) 702-9853> >
Hi Andy, Thanks so much for your response. Here are my answers to your questions. Hope they throw some light on the situation. I am still wondering whether changing 'admin' from 'GeneGragg 1' to 'GeneGragg1', so that home would be '/Users/GeneGragg1/' wouldn't solve things (haven't yet found out how to change admin name on mac). The scripts start : #!/bin/sh What is /bin/sh linked to on a mac? It links to a binary file /bin/sh which seems to reference /bin/zsh (as well as /bin/bash and /bin/dash) JENA_HOME does not need to be set. The scripts should work it out themselves. Does this way work? I took 'export JENA_HOME=~/jena/apache-jena-3.16.0' out of .zshenv. And in a new iTerm window, without this, 'bin/sparql --version' yields the error statement: 'Error: Could not find or load main class 1.jena.apache-jena-3.16.0.log4j2.properties' On a Mac, the script have to their own resolveLink for potential symbolic links - having to do it in script risk space problems. The scripts are all the same, generated from a single template. The only difference is the executable "main" at the end of the script. Could you please put that back and add just after the script has potentially manipulated it.: # After "---- Setup" echo "JENA_HOME='$JENA_HOME'" echo "LOGGING='$LOGGING'" exit so we can see what JENA_HOME is set to. I did this, and on running 'sparql' I get: JENA_HOME='/Users/GeneGragg 1/jena/apache-jena-3.16.0' LOGGING='' What's the "%"? This is part of the out-of-the-box zsh prompt (haven't yet changed it). cd $JENA_HOME should not work (not that I use zsh or bsh) because it's cd /Users/GeneGragg 1/jena/apache-jena-3.16.0 i.e. cd /Users/GeneGragg and extra an arg to cd. With the above 'echo' statements, but without the .zshenv 'export' statement, 'cd $JENA_HOME' has no effect (but doesn't complain 'no such file or directory'). Again, thanks. Gene Gene Gragg University of Chicago Professor Emeritus (Oriental Institute, Linguistics, NELC) Oriental Institute 1155 E. 58th St. Chicago IL 60637 Tel: (773) 307-7486 Fax: (773) 702-9853
