LuceneDemo installation, Linux

Source: Internet
Author: User
LuceneDemo installation, Linux-general Linux technology-Linux programming and kernel information, the following is a detailed description. 1. Go to the latest JDK.

Java.sun.com/javase/downloads/index.jsp

Linux centos, select a Linux32 version

2. Follow the instructions on the sun site to install JDK

3. Check whether the java interpreter is JDK. If gcj is used, use jdk instead.

You need to change the JDK to the new one:

Cd/etc/alternatives

Mv java. old

Ln-s/usr/java/jdk1.6.0 _ 07/bin/java

It looks like this:

Lrwxrwxrwx 1 root 31 Aug 13 :47 java->/usr/local/jdk1.6.0 _ 07/bin/java

4. Then the Lucene part,

The latest version is down.

I down the tar package 2.3.2.

5. tar zxvf xxx.tar

Then set the environment variable

CLASSPATH =/home/wang. wei/Projects/lucene-2.3.2/lucene-core-2.3.2.jar:/home/wang. wei/Projects/lucene-2.3.2/lucene-demos-2.3.2.jar

Export CLASSPATH

This can also be written in. barshc ..

6. Then you can run it.

Java org. apache. lucene. demo. IndexFiles/usr/local/apache2/htdocs/

Java org. apache. lucene. demo. SearchFiles

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.