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: 205
Registered: July 2009
Senior Member
We have a problem with Eclipse Memory Analyzer, Photon, OpenJ9 Java 10 and IBM DTFJ.

The packages com.ibm.dtfj.image, com.ibm.dtfj.java, com.ibm.dtfj.runtime 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:
org.osgi.framework.system.packages=com.ibm.cuda, com.ibm.dataaccess, com.ibm.dtfj.image, com.ibm.dtfj.java, com.ibm.dtfj.runtime, 

See Bug 527353

I then end up with the situation where com.ibm.dtfj.image.ImageFactory in the o.e.mat.dtfj plugin is loaded by jdk.internal.loader.ClassLoaders$AppClassLoader but the implementation in the plugin from com.ibm.dtfj 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: 503
Registered: July 2009
Senior Member
I added a comment to https://bugs.eclipse.org/bugs/show_bug.cgi?id=535351 we should continue the discussion there.
Previous Topic:[p2] When bundles aren't loaded
Next Topic:Problem with Secure Storage
Goto Forum:
  


Current Time: Sat Oct 05 09:26:28 GMT 2024

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

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

Back to the top