chromium embedded - CEF development in Eclipse with Java -
i'm trying develop browser java application , found jcef. made guide without error . want try simple example "mainframe.java", build. created project in eclipse, added jar-files library , copied mainframe-file.
if run it, error:
exception in thread "main" java.lang.unsatisfiedlinkerror: no jcef in java.library.path @ java.lang.classloader.loadlibrary(unknown source) @ java.lang.runtime.loadlibrary0(unknown source) @ java.lang.system.loadlibrary(unknown source) @ org.cef.cefapp.<init>(cefapp.java:157) @ org.cef.cefapp.getinstance(cefapp.java:246) @ org.cef.cefapp.getinstance(cefapp.java:233) @ test.mainframe.<init>(mainframe.java:71) @ test.mainframe.main(mainframe.java:154)
i tried steps described in question , link in comment. if download file in first step don't have described files or paths.
does have idea how make run or doing wrong ?
code of mainframe file:
public class mainframe extends jframe { private static final long serialversionuid = -5570653778104813836l; private final jtextfield address_; private final cefapp cefapp_; private final cefclient client_; private final cefbrowser browser_; private final component browerui_; /** * display simple browser window, suffices create * instance of class cefbrowser , assign ui component * application (e.g. content pane). more verbose, * ctor keeps instance of each object on way browser ui. */ private mainframe(string starturl, boolean useosr, boolean istransparent) { cefapp.addapphandler(new cefapphandleradapter(null) { @override public void statehaschanged(org.cef.cefapp.cefappstate state) { // shutdown app if native cef part terminated if (state == cefappstate.terminated) system.exit(0); } }); cefsettings settings = new cefsettings(); settings.windowless_rendering_enabled = useosr; cefapp_ = cefapp.getinstance(settings); client_ = cefapp_.createclient(); browser_ = client_.createbrowser(starturl, useosr, istransparent); browerui_ = browser_.getuicomponent(); address_ = new jtextfield(starturl, 100); address_.addactionlistener(new actionlistener() { @override public void actionperformed(actionevent e) { browser_.loadurl(address_.gettext()); } }); getcontentpane().add(address_, borderlayout.north); getcontentpane().add(browerui_, borderlayout.center); pack(); setsize(800, 600); setvisible(true); addwindowlistener(new windowadapter() { @override public void windowclosing(windowevent e) { cefapp.getinstance().dispose(); dispose(); } }); } public static void main(string[] args) { new mainframe("http://www.google.com", os.islinux(), false); }
}
i got working. problem build binary files not correctly
Comments
Post a Comment