I am working on a search engine for searching (site is Tutorial Documentation) links & words/phrases contained in Site . I have a code which use org.apache.lucene
package. How do I determine which jar file contains this package (class file is org.apache.lucene.analysis.standard.StandardAnalyzer
). I have downloaded lucene-4.8.0
zip file from Apache mirror site. But It does not contains following classes
org.apache.lucene.analysis.standard.StandardAnalyzer
org.apache.lucene.queryParser.QueryParser
org.apache.lucene.search.Searcher;
My question How do I determine which jar file contains this package (containing all class files). Any guidance for Download site is appreciated. I have searched net but of no avail.
You can use Java jar tool. List the content of jar file in a txt file and you can see all the classes in the jar. You can also use unzip -l jarfile. jar in a pinch.
Use –verbose:class flag with your java command line. This option enables loading and unloading of classes. It shows the jar file from which the class is loaded.
Using the unzip Command The unzip command is a commonly used utility for working with ZIP files from the Linux command-line. Thanks to the unzip command, we can view the content of a JAR file without the JDK. The output above is pretty clear. It lists the files in the JAR file in a tabular format.
You can use Maven search: opt for advanced search and paste the class name. Then from the search results, pick the relevant version (4.8.0 in your case); this will show you the jar.
You can also search for both version and class name. Use v
for version and fc
for class name, e.g. the full query would look like as follows:
v:"4.8.0" fc:"org.apache.lucene.analysis.standard.StandardAnalyzer"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With