Java Development Environment configuration based on open-source Lucene
Some time ago I did some research on text classification, downloaded the open-source LUCENE code, and conducted some preliminary research. If you want to use the open-source code for some programs, there are a lot of Environment configuration points, but they are not troublesome. Now Let's sum up some points.
Jdk1.6-based environment is integrated with the eclipse development environment to complete environment configuration.
1. jdk environment:
Download and install JDK1.6. The environment variable configuration is as follows:
Add the following variables and attribute values to user variables:
Classpath ------ c: \ Program Files \ Java \ jdk1.6.0 _ 02 \ lib \ tools. jar; c: \ Program Files \ Java \ jdk1.6.0 _ 02 \ lib \ dt. jar;
Java_home ------ c: \ Program Files \ Java \ jdk1.6.0 _ 02
Path ------ c: \ Program Files \ Java \ jdk1.6.0 _ 02 \ bin; c: \ Program Files \ Java \ jdk1.6.0 _ 02;
Add the following variables and attribute values to the system variables:
PATH ----- c: \ Program Files \ Java \ jdk1.6.0 _ 02 \ bin; c: \ Program Files \ Java \ jdk1.6.0 _ 02;
CLASSPATH --------.; c: \ Program Files \ Java \ jdk1.6.0 _ 02 \ lib \ tools. jar; c: \ Program Files \ Java \ jdk1.6.0 _ 02 \ lib \ dt. jar;
JAVA_HOME ------- c: \ Program Files \ Java \ jdk1.6.0 _ 02
TOMCAT_HOME -------- c: \ Program Files \ Apache Software Foundation \ Tomcat 5.0
CATALINA_HOME ------ c: \ Program Files \ Apache Software Foundation \ Tomcat 5.0
2. TOMCAT5.0 environment Configuration
According to the preceding JDK configuration, you only need to install the tools in the lib subdirectory under the jdk installation directory. jar and dt. copy jar to the common \ li directory of Tomat. After installation, start the "Apache Tomcat" service and enter "http: // 127.0.0.1: 8080" for testing. If you can see the welcome page of Tomcat, the installation is successful.
3. Deployment and configuration of lucene
Lucene is a pure java program and must be supported by the Java environment. The Configuration Based on the lucene-2.3.0 version is as follows:
In the system environment variables column of the environment variables, add the following to the original text of CLASSPATH:
"D: \ workshop \ javase2.3.0 \ lucene-2.3.0 \ lucene-core-2.3.0.jar; D: \ workshop \ javase2.3.0 \ lucene-2.3.0 \ lucene-demos-2.3.0.jar"
In fact, this is where lucene-related java packages are added. This path is the path of the lucene jar package.
Enter "echo % CLASSPATH %" in the command prompt to check whether the environment variable is correctly added. After the environment variables are configured, deploy the development tools in lucene.
Copy the jsp directory under the src directory in lucene to the webapps \ ROOT directory in Tamcat and rename it javaseweb. Copy the lucene-demos-2.3.0.jar and lucene-core-2.3.0.jar files to the javaseweb \ WEB-INF \ lib directory. (You can also directly copy javaseweb. war to the webapps directory of tomcat ).
Create a folder named docs under javaseweb and add a text file or HTML file to the folder.
So far, all the environments have been configured, and now we can use the open-source lucene for java development.
It's not fun yet. Let's take a look at more related content about Lucene in the split line:
-------------------------------------- Split line --------------------------------------
Indexing and searching based on Lucene multi-index
Lucene (version 2nd) Chinese edition supporting source code
Lucene (version 2nd) PDF
Use Lucene-Spatial to implement full-text retrieval of integrated geographical locations
Lucene + Hadoop distributed search runtime framework Nut 1.0a9
Lucene + Hadoop distributed search runtime framework Nut 1.0a8
Lucene + Hadoop distributed search runtime framework Nut 1.0a7
Project 2-1: Configure Lucene and create a WEB query system [Ubuntu 10.10]
-------------------------------------- Split line --------------------------------------
Lucene details: click here
Lucene: click here
This article permanently updates the link address: