> The ARQ part is wrong. There should be no capitalized ARQ - that looks more > like an old > (when ARQ was distributed separately) path. Let's start with the distribution I downloaded. Here are the links I followed.
On the web page located at http://jena.apache.org/download/index.html, I clicked the http://www.apache.org/dist/jena/ link. This brought me to the "Apache Jena Releases" web page. On that page I selected the "binaries/" hyperlink, which brought me to the "Index of /dist/jena/binaries" (http://www.apache.org/dist/jena/binaries/) web page. >From that web page I downloaded the "apache-jena-2.7.2.zip" file, last >modified on 02 Jul 2012. Is this the latest, stable release? If so, the distribution contains the "README" file attached in this response. Since all the text runs together when opening it in NotePad, I instead opened it in WordPad for better readability. An excerpt from that file follows. <excerpt> Installing Jena --------------- To use Jena in your application, ensure all the .jar files in the lib/ directory are on the classpath or available to your web application. Jena is built and test with these .jar files. Scripts ------- The directories bat/ and bin/ provide script wrappers to run Jena command line tools. The scripts can be copied to a convenient place on the command path. To use the Jena tools from the command line you need to set the JENAROOT environment variable to point to the location where you have unzipped the Jena distribution: Windows: set JENAROOT \path\to\apache-jena-2.7.1 bat\sparql.bat --version Linux export JENAROOT=/path/to/apache-jena-2.7.1 bin/sparql --version </excerpt> How precisely do you interpret setting up the JENAROOT environment variable in Window. What is stated in the README file is inconsistent with instructions provided at http://jena.apache.org/documentation/tools/: <quote> How to set up the CLASSPATH and run Jena command line tools On Linux / Mac export JENAROOT=the directory you downloaded Jena to export PATH=$PATH:$JENAROOT/bin On Windows SET JENAROOT=the directory you downloaded Jena to SET PATH=%PATH%;%JENAROOT%\bat </quote> Bottom line: I still receive the same error message "Error: Could not find or load main class (...)\Documents\_MyStuff\Semantics\ARQ\ARQ" The path presented in this error message makes no sense. On my system the apache-jena-2.7.2 distribution install is "(...)\Documents\_MyStuff\Semantics\ARQ\ARQ 2.9.2\apache-jena-2.7.2". I set the JENAROOT environment variable to "(...)\Documents\_MyStuff\Semantics\ARQ\ARQ 2.9.2\apache-jena-2.7.2C:\Users\Anthony Petosa\Documents\_MyStuff\Semantics\ARQ\ARQ 2.9.2\apache-jena-2.7.2". I appended the following path to the PATH variable: "%JENAROOT%\bat". Any thoughts? Thanks. -----Original Message----- From: Andy Seaborne [mailto:[email protected]] On Behalf Of Andy Seaborne Sent: Tuesday, July 24, 2012 5:17 PM To: [email protected] Subject: Re: Unable to Run Jena'a ARQ Command Line Utility On 24/07/12 19:28, ASPSA wrote: >> Sorry, I wasn't clear. > No problem, and I appreciate your responses. > > In addition to setting the environment, class and classpath variables: > > Environment > ---------------- > JENAROOT = “<Apache Jena 2.7.2 distribution path>” Exactly what is this set to? [[ Error: Could not find or load main class <Apache Jena 2.7.2 distribution path>\ARQ ]] The ARQ part is wrong. There should be no capitalized ARQ - that looks more like an old (when ARQ was distributed separately) path. > Path > ------ > …other semicolon-delimited path entries…, followed by <Apache Jena > 2.7.2 distribution path>\bat; <Apache Jena 2.7.2 distribution > path>\bin bat or bin -- not both. > > ClassPath > ------------ > …other semicolon-delimited path entries…, followed by <Apache Jena > 2.7.2 distribution path>\bat; <Apache Jena 2.7.2 distribution > path>\bin Not needed - the classpath is set by the scripts - have a look at arq.bat: You will see: [[ set JENA_CP="%JENAROOT%\lib\*;" ]] and [[ java %JVM_ARGS% %LOGGING% -cp %JENA_CP% arq.arq %* ]] You can call the java command directly. > > I also include additional classpath values as prescribed here: > http://jena.sourceforge.net/ARQ/Tutorial/query1.html (under the section > "Using the Java command line applications directly". Naturally, I added > values commensurate with the aforementioned Jena release and rebooted by > system for good measure. jena.sourceforge.net is out-of-date. Please use the jena.apache.org site. If you go to : http://jena.sourceforge.net/ARQ/Tutorial/ http://jena.sourceforge.net/ARQ/ you get redirected to the Apache Jena site. The set up for apache-jena is different. See it's README. > > I continue to receive the same error message: > > Error: Could not find or load main class <Apache Jena 2.7.2 > distribution path>\ARQ > > > > -----Original Message----- > From: Joshua TAYLOR [mailto:[email protected]] > Sent: Tuesday, July 24, 2012 9:45 AM > To: [email protected] > Subject: Re: Unable to Run Jena'a ARQ Command Line Utility > >> -----Original Message----- >> From: Joshua TAYLOR [mailto:[email protected]] >> Sent: Monday, July 23, 2012 12:29 PM >> To: [email protected] >> Subject: Re: Unable to Run Jena'a ARQ Command Line Utility >> >> On Mon, Jul 23, 2012 at 12:10 PM, ASPSA <[email protected]> wrote: >>> I recently download the "apache-jena-2.7.2" distribution, which >>> includes "jena-arq-2.9.2.jar" under the "bin" directory. >>> Unfortunately, when I run the ARQ command line utility I receive an >>> error message. For example, when I execute >>> >>> arq --data <some valid Turtle file> --query <some valid SPARQL query >>> file> >>> >>> the command line utility returns the following error: >>> >>> Error: Could not find or load main class <Apache Jena 2.7.2 >>> distribution >>> path>\ARQ >>> >>> I have the following environment, PATH and CLASSPATH variables set, >>> and I restarted my OS. >> >> Will ARQ run if you an absolute path and set just the JENAROOT variable? >> For instance, I can do the following: >> >> $ JENAROOT=/usr/local/lib/apache-jena-2.7.2/ >> /usr/local/lib/apache-jena-2.7.2/bin/arq >> No query string or query file >> >> (I'm not a Jena developer, but a satisfied user who makes lots of use >> of the command line utilities and recently switched to 2.7.2.) > > On Tue, Jul 24, 2012 at 8:43 AM, ASPSA <[email protected]> wrote: >> I assigned the JENAROOT variable an absolute path. I simply used "<Apache >> Jena 2.7.2 distribution path>\bat" in the post as a shortcut for the actual >> path. > > Sorry, I wasn't clear. I meant, what happens if you set JENAROOT and > use the absolute path to the executable (so as to confirm that the > problem isn't with the value of PATH). But since you're getting a Java > error and not a shell error, I guess ARQ is running, at least. I was > just trying to decrease the number of things that could be the > problem. //JT > > -- > Joshua Taylor, http://www.cs.rpi.edu/~tayloj/ > >
