public final class ChromiumBinaries
extends java.lang.Object
Engine
.
By default, Chromium binaries come in a form of an archive inside a JAR file.
The library automatically finds and extracts them when creating an Engine
.
Use this class if you want to extract the binaries in advance, or if you want to override how JxBrowser locates and obtains the binaries.
Modifier and Type | Method and Description |
---|---|
static void |
deliverTo(java.nio.file.Path chromiumDir)
Delivers Chromium binaries to the given
chromiumDir if necessary. |
static void |
deliverTo(java.nio.file.Path chromiumDir,
BinariesDelivery delivery)
Delivers Chromium binaries to the given
chromiumDir , but delegates
actual delivery to the given delivery . |
static void |
deliverToDefaultDirectory()
Delivers Chromium binaries to the
default directory if necessary.
|
static void |
deliverToDefaultDirectory(BinariesDelivery delivery)
Delivers Chromium binaries to the
default directory, but delegates actual
delivery to the given
delivery . |
public static void deliverToDefaultDirectory()
By default, Engine
unpacks and copies the binaries when it is created. This may
take up to several seconds, depending on the hardware. Use this method to do it in advance.
Does nothing if the binaries are already delivered.
ChromiumBinariesDeliveryException
- when the delivery of the Chromium binaries failedthe default directory for the Chromium binaries
public static void deliverToDefaultDirectory(BinariesDelivery delivery)
delivery
.
Use this method to override how JxBrowser locates and obtains the binaries.
Does nothing if the binaries are already delivered.
delivery
- the delivery mechanism of the binariesChromiumBinariesDeliveryException
- when the delivery of the Chromium binaries failedthe default directory for the Chromium binaries
public static void deliverTo(java.nio.file.Path chromiumDir)
chromiumDir
if necessary.
By default, Engine
unpacks and copies the binaries when it is created. This may
take up to several seconds, depending on the hardware. Use this method to do it in advance.
Creates the given directory if it doesn't exist.
Does nothing if the binaries are already delivered.
chromiumDir
- the directory to copy the Chromium binaries toChromiumBinariesDeliveryException
- when the delivery of the Chromium binaries failedthe default directory for the Chromium binaries
public static void deliverTo(java.nio.file.Path chromiumDir, BinariesDelivery delivery)
chromiumDir
, but delegates
actual delivery to the given delivery
.
Use this method to override how JxBrowser locates and obtains the binaries.
Creates the given directory if it doesn't exist.
Does nothing if the binaries are already delivered.
chromiumDir
- the path to the directory where the binaries must be copieddelivery
- the delivery mechanism of the binariesChromiumBinariesDeliveryException
- when the verification of the Chromium binary
files has failed or the binaries couldn't be extracted from the resourcesthe default directory for binaries