Good news for anyone who needs an ability to call Java functions from JavaScript code on a web page. With JxBrowser 3.0 you can now do it easily.

JxBrowser is a Java library that allows embedding Mozilla, Internet Explorer and Safari web browser component into a Swing-based Java desktop application on different platforms.

In JxBrowser 3.0 a new delicious feature was introduced - JavaScript-Java bridge. JavaScript-Java bridge is the way to invoke any Java code from JavaScript on the loaded web page. This feature is available for all JxBrowser engines (Mozilla, Internet Explorer & Safari) on all supported platforms. All you need is register a BrowserFunction instance on Java side:

Java Code:
browser.registerFunction("MyFunction", new BrowserFunction() {
    public Object invoke(Object... args) {
        for (Object arg : args) {
            System.out.println("arg = " + arg);
        return "MyFunction Result";
… and now you can call this Java function from JavaScript in a very simple way:

Java Code:
MyFunction('Arg1', 'Arg2', 100, 200.1);
Connecting JavaScript and Java is now a piece of cake with JxBrowser JavaScript-Java bridge.

JxBrowser 3.0 has a lot of other improvements and features. On Mozilla engine side, support for web pages with Java Applets on Windows was introduced. Mozilla Print functionality provides an easy way to print a web page on a default system printer. On Internet Explorer side W3C support for IE DOM API was implemented.
See the full “menu” for JxBrowser 3.0 release in the release notes.

Use the power of Mozilla, Internet Explorer and Safari in your Java application!

The new version of JxBrowser is available for download and evaluation from the company’s website at JxBrowser. On questions related to JxBrowser, please contact the product support team at or visit the support forum Support.

About TeamDev
TeamDev Ltd. is a Java software development company headquartered in Kharkiv, Ukraine. Since 1994, we have been providing cutting-edge development services to our customers worldwide. TeamDev Ltd.