Class ChromiumBinaries
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.
- Since:
- 7.35
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Delivers Chromium binaries to the givenchromiumDir
if necessary.static void
deliverTo
(Path chromiumDir, BinariesDelivery delivery) Delivers Chromium binaries to the givenchromiumDir
, but delegates actual delivery to the givendelivery
.static void
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 givendelivery
.
-
Method Details
-
deliverToDefaultDirectory
public static void deliverToDefaultDirectory()Delivers Chromium binaries to the default directory 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.Does nothing if the binaries are already delivered.
- Throws:
ChromiumBinariesDeliveryException
- when the delivery of the Chromium binaries failed- See Also:
-
deliverToDefaultDirectory
Delivers Chromium binaries to the default directory, but delegates actual delivery to the givendelivery
.Use this method to override how JxBrowser locates and obtains the binaries.
Does nothing if the binaries are already delivered.
- Parameters:
delivery
- the delivery mechanism of the binaries- Throws:
ChromiumBinariesDeliveryException
- when the delivery of the Chromium binaries failed- See Also:
-
deliverTo
Delivers Chromium binaries to the givenchromiumDir
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.
- Parameters:
chromiumDir
- the directory to copy the Chromium binaries to- Throws:
ChromiumBinariesDeliveryException
- when the delivery of the Chromium binaries failed- See Also:
-
deliverTo
Delivers Chromium binaries to the givenchromiumDir
, but delegates actual delivery to the givendelivery
.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.
- Parameters:
chromiumDir
- the path to the directory where the binaries must be copieddelivery
- the delivery mechanism of the binaries- Throws:
ChromiumBinariesDeliveryException
- when the verification of the Chromium binary files has failed or the binaries couldn't be extracted from the resources- See Also:
-