- Spell Checker
This guide describes how to deploy JxBrowser within your Java application via Java Web Start, Java Applet, or as a regular Java desktop application.
Java Desktop Application
JxBrowser can be used in a cross-desktop Java application like any other standard Java library. All you need to do is to include the required JxBrowser JAR files and the license file into your Java application classpath.
Java Web Start
Java Applet and WebStart functionality, including the Applet API, the Java plug-in, the Java Applet Viewer, JNLP and Java Web Start including the
javaws tool are all deprecated in JDK 9 and will be removed in a future release.
To deploy your Java application with JxBrowser library via Java Web Start (JWS) please follow the steps below:
- Pack your application classes into an application JAR file(s). For example
Sign all the JAR files used in your application including all JxBrowser JARs and the license JAR file with a valid signature. We recommend signing all the JAR files with the same signature. You can use the jarsigner tool for signing. For example:
jarsigner -keystore <keystore-file> -storepass <storepass> -keypass <keypass> <jar-file> <alias>
<alias>with your own values.
Create and configure your application JNLP file, e.g.
application.jnlp, as described below:
<jnlp spec="1.8+" codebase="<my-url>" href="application.jnlp"> <information> <title>Application Title</title> <vendor>Company Name</vendor> <description>Application Description</description> <offline-allowed/> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.6+"/> <jar href="application.jar"/> <jar href="jxbrowser-7.5.jar" /> <jar href="license.jar" /> </resources> <resources os="Windows"> <jar href="lib/jxbrowser-win32-7.5.jar" /> </resources> <resources os="Mac OS X"> <jar href="lib/jxbrowser-mac-7.5.jar" /> </resources> <resources os="Linux" arch="x86_64 amd64"> <jar href="lib/jxbrowser-linux64-7.5.jar" /> </resources> </jnlp>
Make sure to replace the
codebaseattribute value with a valid URL address of your web server where the JAR files will be located.
Depending on the network speed it might take some time to download all the JxBrowser JAR files. To speed up the start up time of your Java Web Start application you might want to use the
download="lazy"attribute of the
jarelement. For example:
<resources os="Windows"> <jar href="lib/jxbrowser-win32-7.5.jar" download="lazy" /> </resources>
- Upload all the signed JAR files and the
application.jnlpfile to your web server.
You can use JxBrowser in Java Applet in the same way as a regular Java library.
JxBrowser requires access to the local file system, so the JAR libraries of your Java Applet and all JxBrowser JARs you use must be signed.
APPLET tag on a web page should look like:
<APPLET code="com.mycompany.myapp.Application.class" codebase="." archive="application.jar, jxbrowser-7.5.jar,jxbrowser-win32-7.5.jar, jxbrowser-mac-7.5.jar, jxbrowser-linux64-7.5.jar" WIDTH=800 HEIGHT=400> Browser does not support Java Applets. </APPLET>
JxBrowser can be used in a Citrix environment. The following instruction describes how Citrix environment should be configured to be able to run JxBrowser.
By default, JxBrowser runs Chromium on Windows with enabled Sandbox. To run JxBrowser in a Citrix environment with Windows Server you should disable Chromium Sandbox using the
Using the approach described below you can configure your Citrix to run any Java application that uses JxBrowser.
- Download and install VirtualBox.
- Download and install Windows Server 2012 on VirtualBox’s VM (VM#1). Make sure that you use the Host Only network with no DHCP VM setting.
- Set static IP for installed VM#1.
- Add the “Active Directory Domain Services” and “DNS Server” server roles:
- Configure Active Directory and DNS following to wizard’s instructions. Setup SSL according to the instruction.
- Install second VM with downloaded Windows Server 2012 (VM#2). Make sure that you use the Host Only network on the same controller as VM#1 VM setting.
- Set static IP for installed VM#2 in the same sub-network as VM#1.
- Join VM#2 to Active Directory located on VM#1.
- Import SSL certificate from VM#1.
- Download Citrix XenDesktop.
- Install XenDesktop on VM#2. Please note that it cannot be installed on domain controller.
- Install Delivery Controller.
- Configure the XenDesktop. Add VM#2 into new Delivery Group and manually add Application as shown below:
- Install and configure Virtual Delivery Agent for Windows Server OS. After setup: change the StoreWeb base URL to use HTTPS.
- Install Citrix Receiver on VM#1. Install
CitrixReceiver.exe. Connect to VM#2 using IE and allow the installation of
- Make sure that the application can be started in Browser and close the browser.
- Open Citrix Receiver, enter the server name as
vm1.domain.localand make sure that the application can be started in Citrix Receiver client.
Please note that since JxBrowser version 7.0, OSGi is no longer supported.
Taking into account the number of the OSGi specification implementations, their versions, and the ways developers can configure OSGi applications, we cannot guarantee that JxBrowser OSGi bundles will be compatible with all possible configurations. Due to this fact, we decided to drop the OSGi support in version 7.0.