You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tika.apache.org by Jean-Nicolas Boulay Desjardins <jn...@gmail.com> on 2018/03/03 19:03:52 UTC

Unable to use -classpath

Hi,

I am using this command:

java -classpath /home/$USER/Projects/Lab/tika/classes/ -jar
./tika-app/target/tika-app-1.17.jar

In /home/$USER/Projects/Lab/tika/classes/ I have:

sqlite-jdbc-3.19.3.jar

But I still get this error:

Mar 03, 2018 1:48:06 PM
org.apache.tika.config.InitializableProblemHandler$3
handleInitializableProblem
WARNING: org.xerial's sqlite-jdbc is not loaded.
Please provide the jar on your classpath to parse sqlite files.

I even added this:

classes/org/xerial/sqlite-jdbc-3.19.3.jar

I am out of ideas.

Re: Unable to use -classpath

Posted by Jean-Nicolas Boulay Desjardins <jn...@gmail.com>.
Thank you

On Mon, Mar 5, 2018 at 6:14 AM, Nick Burch <ap...@gagravarr.org> wrote:

> On Sat, 3 Mar 2018, Jean-Nicolas Boulay Desjardins wrote:
>
>> I am using this command:
>>
>> java -classpath /home/$USER/Projects/Lab/tika/classes/ -jar
>> ./tika-app/target/tika-app-1.17.jar
>>
>
> Java ignores -classpath if you also specify -jar
>
> In /home/$USER/Projects/Lab/tika/classes/ I have:
>> sqlite-jdbc-3.19.3.jar
>>
>
> Java only reads classes from a directory on a classpath by default, not
> jars, so the jar in here will be ignored
>
>
> So, you need to stop using -jar if you want -classpath to be used, and to
> tell Java to load your other jars by either giving a wildcard on the
> classpath line or explicitly specifying all of them
>
> Nick
>

Re: Unable to use -classpath

Posted by Nick Burch <ap...@gagravarr.org>.
On Sat, 3 Mar 2018, Jean-Nicolas Boulay Desjardins wrote:
> I am using this command:
>
> java -classpath /home/$USER/Projects/Lab/tika/classes/ -jar
> ./tika-app/target/tika-app-1.17.jar

Java ignores -classpath if you also specify -jar

> In /home/$USER/Projects/Lab/tika/classes/ I have:
> sqlite-jdbc-3.19.3.jar

Java only reads classes from a directory on a classpath by default, not 
jars, so the jar in here will be ignored


So, you need to stop using -jar if you want -classpath to be used, and to 
tell Java to load your other jars by either giving a wildcard on the 
classpath line or explicitly specifying all of them

Nick