-1

I am trying to run some of Jx Browser's samples. After copying and pasting the sample code provided by it, and trying to run it, it gives me an Initializer error. here is the sample code and the exception. Can anybody tell me what's going on?

package jx.test;

import com.teamdev.jxbrowser.chromium.Browser;
import com.teamdev.jxbrowser.chromium.BrowserFactory;
import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.WindowConstants;


public class JxTest {

    public static void main(String[] args) {
     final Browser browser = BrowserFactory.create();

        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.add(browser.getView().getComponent(), BorderLayout.CENTER);
        frame.setSize(700, 500);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);

        browser.loadURL("http://www.google.com");
    }
}

The exception:

Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.teamdev.jxbrowser.chromium.BrowserFactory.create(Unknown Source)
    at com.teamdev.jxbrowser.chromium.BrowserFactory.create(Unknown Source)
    at com.teamdev.jxbrowser.chromium.BrowserFactory.create(Unknown Source)
    at jx.test.JxTest.main(JxTest.java:20)
Caused by: java.lang.RuntimeException: JxBrowser license check failed: No valid license found. 
Java Result: 1
4

2 回答 2

1

我认为错误是不言自明的。您需要许可证。

JxBrowser 库需要有效的许可证 (teamdev.licenses) 文件才能进行操作。您可以申请功能齐全的 30 天评估许可证或购买 JxBrowser 库的商业许可证。

来源

于 2014-11-05T06:07:52.563 回答
0

如果您将申请许可证,他们将在您的电子邮件中提供 ua license.jar 文件如果您导入该文件,您的问题将得到解决

于 2014-12-05T07:42:23.087 回答