JMC-6370: JMC build fails with OpenJDK 8 due to missing javafx packages in org.openjdk.jmc.javafx.osgi
Langer, Christoph
christoph.langer at sap.com
Mon Jan 28 07:52:08 UTC 2019
Hi Jie,
thanks for posting the fix. I can confirm that the build using OpenJDK works for me with these changes. Other people need to assess whether the changes are functionally correct, though
Best regards
Christoph
> -----Original Message-----
> From: jmc-dev <jmc-dev-bounces at openjdk.java.net> On Behalf Of Jie Kang
> Sent: Freitag, 25. Januar 2019 17:28
> To: jmc-dev at openjdk.java.net
> Subject: RFR: JMC-6370: JMC build fails with OpenJDK 8 due to missing javafx
> packages in org.openjdk.jmc.javafx.osgi
>
> Hi,
>
> The following patch allows JMC to build with OpenJDK 8.
>
> * removes org.openjdk.jmc.javafx.osgi plugin from base feature
> org.openjdk.jmc.feature.flightrecorder where it is unused
> * removes org.openjdk.jmc.javafx.osgi dependency from
> org.openjdk.jmc.flightrecorder.ui where it is unused
> * updates MANIFEST.MF of org.openjdk.jmc.javafx.osgi to include the
> correct imports for javafx packages
> * removes unnecessary extra classpath elements as OpenJFX jars now
> come from the p2 site and the MANIFEST.MF has the correct imports
>
> Note: the JOverflow plugin requires OpenJFX which has
> <Bundle-RequiredExecutionEnvironment>JavaSE-10</Bundle-
> RequiredExecutionEnvironment>
>
> I have tested this on Fedora 28 building on OpenJDK 8 and running the
> result using OpenJDK 8 and 11. The JOverflow plugin continues to work
> on OpenJDK 11. On OpenJDK 8, the plugin fails to load but the rest of
> JMC still functions.
>
> Let me know how it looks!
>
> diff --git a/application/org.openjdk.jmc.feature.flightrecorder/feature.xml
> b/application/org.openjdk.jmc.feature.flightrecorder/feature.xml
> --- a/application/org.openjdk.jmc.feature.flightrecorder/feature.xml
> +++ b/application/org.openjdk.jmc.feature.flightrecorder/feature.xml
> @@ -94,13 +94,6 @@
> unpack="false"/>
>
> <plugin
> - id="org.openjdk.jmc.javafx.osgi"
> - download-size="0"
> - install-size="0"
> - version="0.0.0"
> - unpack="false"/>
> -
> - <plugin
> id="org.openjdk.jmc.flightrecorder.rules.extensionprovider"
> download-size="0"
> install-size="0"
> diff --git a/application/org.openjdk.jmc.flightrecorder.ui/META-
> INF/MANIFEST.MF
> b/application/org.openjdk.jmc.flightrecorder.ui/META-INF/MANIFEST.MF
> --- a/application/org.openjdk.jmc.flightrecorder.ui/META-INF/MANIFEST.MF
> +++ b/application/org.openjdk.jmc.flightrecorder.ui/META-
> INF/MANIFEST.MF
> @@ -9,7 +9,6 @@
> Require-Bundle: org.openjdk.jmc.rjmx,
> org.openjdk.jmc.flightrecorder;visibility:=reexport,
> org.openjdk.jmc.ui;visibility:=reexport,
> - org.openjdk.jmc.javafx.osgi,
> org.openjdk.jmc.flightrecorder.rules,
> org.openjdk.jmc.flightrecorder.rules.jdk,
> org.openjdk.jmc.flightrecorder.configuration,
> diff --git a/application/org.openjdk.jmc.javafx.osgi/META-INF/MANIFEST.MF
> b/application/org.openjdk.jmc.javafx.osgi/META-INF/MANIFEST.MF
> --- a/application/org.openjdk.jmc.javafx.osgi/META-INF/MANIFEST.MF
> +++ b/application/org.openjdk.jmc.javafx.osgi/META-INF/MANIFEST.MF
> @@ -7,6 +7,9 @@
> Bundle-RequiredExecutionEnvironment: JavaSE-1.8
> Bundle-ClassPath: .
> Eclipse-BuddyPolicy: app
> +Import-Package: javafx.application, javafx.embed.swt,
> + javafx.fxml, javafx.scene, javafx.scene.control,
> + javafx.scene.image
> Export-Package: org.openjdk.jmc.javafx.osgi
> Require-Bundle: org.eclipse.swt;resolution:=optional,
> org.eclipse.jface
> diff --git a/application/org.openjdk.jmc.javafx.osgi/pom.xml
> b/application/org.openjdk.jmc.javafx.osgi/pom.xml
> --- a/application/org.openjdk.jmc.javafx.osgi/pom.xml
> +++ b/application/org.openjdk.jmc.javafx.osgi/pom.xml
> @@ -40,27 +40,4 @@
> </parent>
> <artifactId>org.openjdk.jmc.javafx.osgi</artifactId>
> <packaging>eclipse-plugin</packaging>
> - <build>
> - <plugins>
> - <plugin>
> - <groupId>org.eclipse.tycho</groupId>
> - <artifactId>tycho-compiler-plugin</artifactId>
> - <version>${tycho.version}</version>
> - <configuration>
> - <excludes>
> - <exclude>**/Empty.java</exclude>
> - </excludes>
> - <extraClasspathElements>
> - <dependency>
> - <groupId>sun.jdk</groupId>
> - <artifactId>jfxswt</artifactId>
> - <version>1.8.0</version>
> - <scope>system</scope>
> - <systemPath>${java.home}/lib/jfxswt.jar</systemPath>
> - </dependency>
> - </extraClasspathElements>
> - </configuration>
> - </plugin>
> - </plugins>
> - </build>
> </project>
>
>
> Regards,
More information about the jmc-dev
mailing list