Yes, you will need to add htmlparser.jar to the list of jars in eclipse. Yes, you will need to at least import org.htmlparser.<something>.
I would suggest looking at the example applications in the org/htmlparser/parserapplication directory in the src.zip file that comes with the download.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everybody.
This forum is for newbies so...
I don't know even how to ask my question.
How to add htmlparser jars to my Java application to make it work?
Do I have to add import declarations?
Can I add jar to my Eclipse so that Eclipse would help me with code completion?
thanks in advance
best regards R
Yes, you will need to add htmlparser.jar to the list of jars in eclipse. Yes, you will need to at least import org.htmlparser.<something>.
I would suggest looking at the example applications in the org/htmlparser/parserapplication directory in the src.zip file that comes with the download.
I added all jars that cames with the zip file to Eclipse
and I added import:
import org.htmlparser.parserapplications.LinkExtractor;
but when I create object:
LinkExtractor le = new LinkExtractor();
Eclipse shows me (code completion) that le object has only basic methods inherited from main Object class.
I guess that this le has its own methods ;-)
How can I make them accessible for me in Eclipse?
Sorry I know it's a question about Eclipse rather then HTMLParser but if You could answer I appreciate it
best regards
R
or maybe without Eclipse
how can I compile HTMLParser using comandline javac
(I'm using Linux)
thanks in advance
best regards
R
On linux if you are in the root directory of your own java files, the command line compile is something like:
javac -classpath .:htmlp_dir/lib/htmlparser.jar MyClass.java
where htmlp_dir is the directory that you unzipped the distribution to plus /htmlparser1_5 (assuming you have a recent version).