java - How to resolve the import org.obix? -


i'm trying use obix java, found simple tutorial in google. have libraries like: obix.jar, dom.jar, jaxen-full.jar, sax.jar, saxpath.jar, , xercesimpl.jar.

the sample.config.xml is:

<?xml version="1.0" encoding="utf-8"?> <!doctype configuration system "http://obix-framework.sourceforge.net/docs/obix-configuration.dtd"> <configuration>   <entry entrykey="message">     <value>hello world!</value>   </entry> </configuration> 

and java code is:

import static java.lang.system.out; import org.obix.configuration.configuration; import org.obix.configuration.configurationadapter; import org.obix.configuration.configurationadapterfactory;  public final class obixsample {    public static void main(final string[] args) {     final configurationadapterfactory factory = configurationadapterfactory.newadapterfactory();      final configuration config = configuration.getconfiguration();     final configurationadapter adapter = factory.create(null);     adapter.adaptconfiguration(config, "sample.config");     out.println(config.getstringvalue("message"));   } } 

so in eclipse first 3 lines import red , says

the import org.obix cannot resolved

how can resolve problem?

you must have related jars in java build path.

right click project > build path > configure build path > java build path > add jars in libraries tab 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -