-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
lonesome
  • 2,503
  • 6
  • 35
  • 61

2 Answers2

1

I think the error is self explanatory. You require a license.

The JxBrowser library requires a valid license (teamdev.licenses) file for operations. You can request a fully-functional 30-day evaluation license or purchase a commercial license for JxBrowser library.

(Source)

Eran
  • 387,369
  • 54
  • 702
  • 768
  • 2
    oh man, I've been told this is a good browser to embed to my project and now it turned out it's not even open source! that sucks. is there any other options and replacements? – lonesome Nov 05 '14 at 06:10
  • 1
    @lonesome I have no idea – Eran Nov 05 '14 at 06:16
0

if u will apply for the license they will give u a license.jar file in ur email if u import that file your problem will resolved