Introduction

"JRex" is a Java Browser Component with set of API's for Embedding Mozilla Browser within a Java Application.

The goal is to provide java wrapper around the required Mozilla embedding interfaces.

You can find API Documentation for JRex here

Operating Systems

Java environments

Mozilla Version

LiveConnect Support

Latest Update

Using JRex

The test application (JRexExample.java) bundled with JRex demonstrates using of basic JRex features. All the JRex API's are well documented and can be foundhere.

Basic code for getting JRex up and running in your application is give below.

//set the system property "jrex.gre.path" to Mozilla bin directory.
System.setProperty("jrex.gre.path","C:/mozilla/bin");

//start the JRex XPCOM engine.
JRexFactory.getInstance().startEngine();

//Get the JRex WindowManager implementation.
JRexWindowManager winManager=(JRexWindowManager)JRexFactory.getInstance().getImplInstance(JRexFactory.WINDOW_MANAGER);

//Create the JRex WindowManager with desired window mode.
winManager.create(JRexWindowManager.TAB_MODE);

//init the window manager with a parent component where JRex browser sits, if component is null then a new JFrame will be used.
winManager.init(null);

//that's it ;)

Note:- Please read the JRex API documentation before using any of the above API's  

Building JRex

For building JRex, you need to build Mozilla first. See Building Mozilla.
On windows you need Visual C++ 6.0, If you want to build Mozilla on windows using GCC See Building Mozilla (GCC)

Steps I used to compile Mozilla

JRex Build Requirements

On Windows

On Linux

JRex Build Instructions

JRex Webstart Deployment


 

 

JRex- The Jed TRex