Task #2738

Improve JavaFX libraries integration in TXM

Added by Sebastien Jacquot 6 months ago.

Status:New Start date:01/23/2020
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Development Spent time: -
Target version:TXM 0.8.2

Description

Current state: #2698.

JavaFX library is loaded when "-Dosgi.parentClassloader=ext" is set in the product launcher options

note: the "-Dosgi.parentClassloader=ext" option force us to publish TXM with an installer

Note 1:

We do not need to publish a new installer to modify launcher arguments but should look at the P2.inf mechanism.
P2 offers a way for bundles to execute some commands at different stage of an installation or an uninstallation.
Commands can for example, change file rights, change JVM path, add/remove JVM launcher args, copy/delete files, etc.

See: https://help.eclipse.org/2019-12/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_actions_touchpoints.html
https://wiki.eclipse.org/Equinox/p2/Engine

Note 2:

Add a p2.inf file to the root of org.txm.libs.javafx.feature containing the following touchpoint actions:

instructions.configure = org.eclipse.equinox.p2.touchpoint.eclipse.addJvmArg(jvmArg:-Dorg.osgi.framework.bundle.parent=ext);
instructions.unconfigure = org.eclipse.equinox.p2.touchpoint.eclipse.removeJVMArg(jvmArg:-Dorg.osgi.framework.bundle.parent=ext);

Also available in: Atom PDF