Task #2698
RCP: X.X, JavaFX libraries
Status: | Feedback | Start date: | 12/19/2019 | ||
---|---|---|---|---|---|
Priority: | Normal | Due date: | |||
Assignee: | - | % Done: | 80% |
||
Category: | Development | Spent time: | - | ||
Target version: | TXM 0.8.1 |
Description
To enable JavaFX in TXM we need to use JavaFX library and the JavaFX SWT library.
JavaFX SWT library are be loaded in classloader with SWT libraries: in 1 plugin org.txm.libs.javafx and 3 fragments org.txm.libs.javafx.linux, org.txm.libs.javafx.win32 and org.txm.libs.javafx.macosx.
Each fragment contains the JavaFX runtime library (jfxrt.jar) and the JavaFX SWT library (jfxswt.jar).
Validation steps¶
- install Media Player extension
- open a video from "File\Open Media file..."
Related issues
History
#1 Updated by Matthieu Decorde about 3 years ago
- Description updated (diff)
#2 Updated by Serge Heiden about 3 years ago
org.osgi.framework.system.packages.extra
property to drive the osgi boot classpath.
- source in stackoverflow: https://stackoverflow.com/questions/10337959/cant-instantiate-class-from-installed-extension-when-run-via-osgi
- documentation
- exposing-the-boot-classpath-in-osgi: https://spring.io/blog/2009/01/19/exposing-the-boot-classpath-in-osgi
- OSGi core specification, sections 3.8, 3.14 and 3.15: https://osgi.org/download/r4v41/r4.core.pdf
- ClassLoader API: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassLoader.html
- Eclipse Runtime Options (specifically osgi.parentClassLoader): https://help.eclipse.org/2019-09/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html
#3 Updated by Serge Heiden about 3 years ago
Documentation¶
- Extension Mechanism Architecture: https://docs.oracle.com/javase/7/docs/technotes/guides/extensions/spec.html
- The Extension Mechanism for Support of Optional Packages (deprecated): https://docs.oracle.com/javase/8/docs/technotes/guides/extensions
- The Java Extensions Framework (old JDK 1.2 documentation): https://courses.cs.washington.edu/courses/cse341/98au/java/jdk1.2beta4/docs/guide/extensions/index.html
#4 Updated by Matthieu Decorde about 3 years ago
- % Done changed from 0 to 80
javafx plugins (4: core, linux, win32 and macosx) are shipped in the TXM main update
#5 Updated by Sebastien Jacquot about 3 years ago
- % Done changed from 80 to 60
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
#6 Updated by Sebastien Jacquot about 3 years ago
New proposal¶
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);
#7 Updated by Sebastien Jacquot about 3 years ago
- Tracker changed from Feature to Task
- Description updated (diff)
- Category set to Development
- Status changed from New to Feedback
- Target version changed from TXM 0.8.2 to TXM 0.8.1
- % Done changed from 60 to 80