You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by jerrittpace <je...@yahoo.ie> on 2015/12/03 22:57:30 UTC
lucene classpath
I am trying to set the classpath for the lucene jars
I have tried many different variations of the following:
java -classpath
C:\Users\User5\Documents\lucene\lucene-5.3.1\demo\lucene-demo-5.3.1.jar;C:\Users\User5\Documents\lucene\lucene-5.3.1\core\lucene-core-5.3.1.jar
org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}/src
That code is similar to the commands I have found in the various examples
i've found on the web addressing this sort of issue.
I also tried
java -classpath
C:\Users\User5\Documents\lucene\lucene-5.3.1\demo\lucene-demo-5.3.1.jar;C:\Users\User5\Documents\lucene\lucene-5.3.1\core\lucene-core-5.3.1.jar
org.apache.lucene.demo.IndexFiles -docs
{C:\Users\User5\Documents\lucene\lucene-5.3.1}/src
The lucene site at https://lucene.apache.org/core/2_9_4/demo.html basically
just says "Put both of these files in your Java CLASSPATH."
I am not able to solve this concern as of now, and so I would really
appreciate any help I can find to steer me in the right direction to solve
this problem.
Thank you in advance for your help!!
--
View this message in context: http://lucene.472066.n3.nabble.com/lucene-classpath-tp4243489.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: lucene classpath
Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,
you are using a very old version of the demo tutorial (for version 2.9.4) with newer versions of the class files. The Demo Module in 5.3.1 was restructured, so you need many more JAR files on classpath. See the documentation of 5.3.1:
http://lucene.apache.org/core/5_3_1/demo/index.html
In addition, you only tell us that you don't get the classpath correct, but you don't paste us error messages, so I have no idea what the exact problem is.
Uwe
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de
> -----Original Message-----
> From: jerrittpace [mailto:jerrittpace@yahoo.ie]
> Sent: Thursday, December 03, 2015 10:58 PM
> To: java-user@lucene.apache.org
> Subject: lucene classpath
>
> I am trying to set the classpath for the lucene jars
>
> I have tried many different variations of the following:
>
> java -classpath
> C:\Users\User5\Documents\lucene\lucene-5.3.1\demo\lucene-demo-
> 5.3.1.jar;C:\Users\User5\Documents\lucene\lucene-5.3.1\core\lucene-core-
> 5.3.1.jar
> org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}/src
>
> That code is similar to the commands I have found in the various examples
> i've found on the web addressing this sort of issue.
>
> I also tried
>
> java -classpath
> C:\Users\User5\Documents\lucene\lucene-5.3.1\demo\lucene-demo-
> 5.3.1.jar;C:\Users\User5\Documents\lucene\lucene-5.3.1\core\lucene-core-
> 5.3.1.jar
> org.apache.lucene.demo.IndexFiles -docs
> {C:\Users\User5\Documents\lucene\lucene-5.3.1}/src
>
> The lucene site at https://lucene.apache.org/core/2_9_4/demo.html
> basically
> just says "Put both of these files in your Java CLASSPATH."
>
> I am not able to solve this concern as of now, and so I would really
> appreciate any help I can find to steer me in the right direction to solve
> this problem.
>
> Thank you in advance for your help!!
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/lucene-
> classpath-tp4243489.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: lucene classpath
Posted by Ahmet Arslan <io...@yahoo.com.INVALID>.
Hi,
May be windows path separator messing things.
Can you try to copy jars to current working directory and re-try
java -classpath lucene-demo-5.3.1.jar;lucene-core-5.3.1.jar
Ahmet
On Thursday, December 3, 2015 11:57 PM, jerrittpace <je...@yahoo.ie> wrote:
I am trying to set the classpath for the lucene jars
I have tried many different variations of the following:
java -classpath
C:\Users\User5\Documents\lucene\lucene-5.3.1\demo\lucene-demo-5.3.1.jar;C:\Users\User5\Documents\lucene\lucene-5.3.1\core\lucene-core-5.3.1.jar
org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}/src
That code is similar to the commands I have found in the various examples
i've found on the web addressing this sort of issue.
I also tried
java -classpath
C:\Users\User5\Documents\lucene\lucene-5.3.1\demo\lucene-demo-5.3.1.jar;C:\Users\User5\Documents\lucene\lucene-5.3.1\core\lucene-core-5.3.1.jar
org.apache.lucene.demo.IndexFiles -docs
{C:\Users\User5\Documents\lucene\lucene-5.3.1}/src
The lucene site at https://lucene.apache.org/core/2_9_4/demo.html basically
just says "Put both of these files in your Java CLASSPATH."
I am not able to solve this concern as of now, and so I would really
appreciate any help I can find to steer me in the right direction to solve
this problem.
Thank you in advance for your help!!
--
View this message in context: http://lucene.472066.n3.nabble.com/lucene-classpath-tp4243489.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: lucene classpath
Posted by jerrittpace <je...@yahoo.ie>.
Thank you I don't know how I missed that, but I really appreciate your help!!
--
View this message in context: http://lucene.472066.n3.nabble.com/lucene-classpath-tp4243489p4243600.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: lucene classpath
Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,
The "{" chars should not be in the path. The message is very clear, so fix your parameters and the demo should work!
Uwe
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de
> -----Original Message-----
> From: jerrittpace [mailto:jerrittpace@yahoo.ie]
> Sent: Friday, December 04, 2015 4:29 PM
> To: java-user@lucene.apache.org
> Subject: Re: lucene classpath
>
> I have set the CLASSPATH, as such:
>
> C:\Users\User5>echo %CLASSPATH%
> C:\Users\User5\Documents\lucene\lucene-5.3.1\core\lucene-core-
> 5.3.1.jar;C:\Users
> \User5\Documents\lucene\lucene-5.3.1\queryparser\lucene-queryparser-
> 5.3.1.jar;C:
> \Users\User5\Documents\lucene\lucene-5.3.1\demo\lucene-demo-
> 5.3.1.jar;C:\Users\U
> ser5\Documents\lucene\lucene-5.3.1\analysis\common\lucene-analyzers-
> common-5.3.1
> .jar
>
> But, when I try to run the demo:
>
> C:\Users\User5>java org.apache.lucene.demo.IndexFiles -docs
> {C:\Users\User5\Docu
> ments\lucene\lucene-5.3.1}/src
>
> I get this error:
>
> Exception in thread "main" java.nio.file.InvalidPathException: Illegal char
> <:>
> at index 2: {C:\Users\User5\Documents\lucene\lucene-5.3.1}/src
> at
> sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
> at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
> at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
> at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
> at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
> at java.nio.file.Paths.get(Paths.java:84)
> at org.apache.lucene.demo.IndexFiles.main(IndexFiles.java:82)
>
> Any help would be much appreciated!!
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/lucene-
> classpath-tp4243489p4243596.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: lucene classpath
Posted by jerrittpace <je...@yahoo.ie>.
I have set the CLASSPATH, as such:
C:\Users\User5>echo %CLASSPATH%
C:\Users\User5\Documents\lucene\lucene-5.3.1\core\lucene-core-5.3.1.jar;C:\Users
\User5\Documents\lucene\lucene-5.3.1\queryparser\lucene-queryparser-5.3.1.jar;C:
\Users\User5\Documents\lucene\lucene-5.3.1\demo\lucene-demo-5.3.1.jar;C:\Users\U
ser5\Documents\lucene\lucene-5.3.1\analysis\common\lucene-analyzers-common-5.3.1
.jar
But, when I try to run the demo:
C:\Users\User5>java org.apache.lucene.demo.IndexFiles -docs
{C:\Users\User5\Docu
ments\lucene\lucene-5.3.1}/src
I get this error:
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char
<:>
at index 2: {C:\Users\User5\Documents\lucene\lucene-5.3.1}/src
at
sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
at org.apache.lucene.demo.IndexFiles.main(IndexFiles.java:82)
Any help would be much appreciated!!
--
View this message in context: http://lucene.472066.n3.nabble.com/lucene-classpath-tp4243489p4243596.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org