Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Overriding JVM packages declared in org.osgi.framework.system.packages
Overriding JVM packages declared in org.osgi.framework.system.packages [message #1790404] Sat, 09 June 2018 14:58 Go to next message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 190
Registered: July 2009
Senior Member
We have a problem with Eclipse Memory Analyzer, Photon, OpenJ9 Java 10 and IBM DTFJ.

The packages,, are defined by both the OpenJ9 Java 10 JVM, and by a separate feature / plugins from IBM.

I want the Memory Analyzer DTFJ plugin to always use the separate DTFJ feature so it will work with any JVM.

With Photon and OpenJ9 Java 10 it seems every JDK package is put into org.osgi.framework.system.packages
so it starts like:,,,,, 

See Bug 527353

I then end up with the situation where in the o.e.mat.dtfj plugin is loaded by jdk.internal.loader.ClassLoaders$AppClassLoader but the implementation in the plugin from feature is loaded by org.eclipse.osgi.internal.loader.EquinoxClassLoader
and the classes are not compatible.

See Bug 535351: Failure opening an IBM/OpenJ9 core dump with DTFJ under OpenJ9 Java 10

How should all this work?

It seems a bit odd for Equinox to export all of the JVM classes in such a way that they override real plugins. Ideally I would like a solution which does not involve changing startup options as MAT might be installed in an existing Eclipse.

On the other hand, in another plugin I do want to get access to com.sun.tool.attach package from the JVM via reflection if it is available, so totally hiding extra JVM packages in Java 10 is also not suitable - unless there was a way to ask for them which also worked with Java 8.

Any comments or ideas?
Re: Overriding JVM packages declared in org.osgi.framework.system.packages [message #1790536 is a reply to message #1790404] Tue, 12 June 2018 13:24 Go to previous message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 502
Registered: July 2009
Senior Member
I added a comment to we should continue the discussion there.
Previous Topic:[p2] When bundles aren't loaded
Next Topic:Problem with Secure Storage
Goto Forum:

Current Time: Mon Sep 26 03:07:34 GMT 2022

Powered by FUDForum. Page generated in 0.02210 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top