So I just went ahead and reproduced your steps, comments inline:

On 7/25/12 3:27 PM, "ASPSA" <as...@optonline.net> wrote:

>> 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/:

Yes there was an error here, there is a missing = in the README for the
Windows example that is present on the website, fixed in SVN.  I also
notice that the path stated in the README reflects an old version of Jena
so I fixed that as well

>
><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"

This error means that your JENAROOT is incorrect in some way, I hit the
same error initially and realized I had just typed the path in wrong

One easy way to diagnose whether it is set correctly is to try the
following command after you've set JENAROOT:

cd %JENAROOT%

If you get "The system cannot find the path specified" then it is set
incorrectly, if it works then JENAROOT is set to a valid path.

However if this works and you still get path errors then the question
becomes does your path contain any spaces?

When I make my path contain spaces I reliably hit this error, it looks
like the scripts don't actually handle paths containing spaces correctly.
I added an issue JENA-286 (https://issues.apache.org/jira/browse/JENA-286)
for this bug and we will make sure this is fixed for the next release.

Apologies for the inconvenience caused, in the meantime the workaround is
either to manually modify the scripts you need as shown in that bug report
or to move your location to a path without spaces in it

Hope this helps,

Rob Vesse

>
>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:andy.seaborne.apa...@gmail.com] On Behalf Of
>Andy Seaborne
>Sent: Tuesday, July 24, 2012 5:17 PM
>To: users@jena.apache.org
>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:joshuaaa...@gmail.com]
>> Sent: Tuesday, July 24, 2012 9:45 AM
>> To: users@jena.apache.org
>> Subject: Re: Unable to Run Jena'a ARQ Command Line Utility
>>
>>> -----Original Message-----
>>> From: Joshua TAYLOR [mailto:joshuaaa...@gmail.com]
>>> Sent: Monday, July 23, 2012 12:29 PM
>>> To: users@jena.apache.org
>>> Subject: Re: Unable to Run Jena'a ARQ Command Line Utility
>>>
>>> On Mon, Jul 23, 2012 at 12:10 PM, ASPSA <as...@optonline.net> 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 <as...@optonline.net> 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/
>>
>>
>

Reply via email to