Hello people,

I seem to be having executing and compile a program. I am using a jar file and i was told to put the jar file on to the library.

The jar file is htmlparser.jar


I have placed on to the java build path.

But i keep getting errors - i don't what to do - its stops me from to compile and execute it.

i even debug it and its said this problem

"url class loader$.run() error"

here is the code !

import org.htmlparser.Parser;
import org.htmlparser.util.NodeList;
import org.htmlparser.util.ParserException;
import java.util.ArrayList;
  
    class Test
    {
        public static void main (String[] args)
        
      {
            try
            
            {
                Parser parser = new Parser (args[0]);
                NodeList list = parser.parse (null);
                System.out.println (list.toHtml ());
            }
            catch (ParserException pe)
            {
                pe.printStackTrace ();
            }
        }
    }

any help is apperciated

Thank you :icon_cheesygrin:

You are using an IDE? Because it looks like your compiler doesn't find your jar file where you assigned it to...

yeah i think i am using that format - why is that the problem ?

Hmm... Then you may need to move your jar file to where it should be. Not sure where it is, but you need to consult your IDE's tutorial. Each IDE has its own setting.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.