Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-update-dev] Eclipse3.1M1 on .NET/linux - overriding plugin class loading for .dlls


Our osgi implementation is "pluggable" in that the code that does classload can be replaced / extended.
For that you would have to write your own FrameworkAdaptor (I recommand starting from a subclass of EclipseAdaptor).
This adaptor allows you to create your own Classloader which can, when initialized (see the initialize method) do all sorts of things and of course overload findClass etc.

Note that the platform newsgroup is more appropriate for this kind of questions and that you can also find info about that in the archive of the equinox newsgroup.

HTH

        PaScaL


David Jung <jungdl@xxxxxxxx>
Sent by: platform-update-dev-admin@xxxxxxxxxxx

09/09/2004 02:58 AM

Please respond to
platform-update-dev

To
platform-update-dev@xxxxxxxxxxx
cc
Subject
[platform-update-dev] Eclipse3.1M1 on .NET/linux - overriding plugin class loading for .dlls





I'm currently using SWT and wish to use Eclipse 3.1M1 in a non-Java
environment.
Currently, I've manually cross-compiled all the .class files within each
jar into .NET byte-codes (CLR IL codes).  
I keep the original jars around too, as some parts of the osgi like to
poke into them to look at plugin.xml etc. (having that fetched from a
resource in a .dll is for another day).  My own classes are written in C#.

I was wondering if someone knowledgable in how osgi and the startup
mechanism works would be able to give me some starting pointers as to
where I need to look to override .jar class loading.
Essentially, every time a .jar is about to be loaded, I'd want to first
cross-compile it to a .dll (and cache that) and load the .dll into memory
instead (hence getting all the classes at once).
In the environment I'm using (mono/ikvmc), using classLoad() only loads
the java byte codes directly and inteprets them (as in a typical java
machine) - which I want to avoid for performance reasons.

Currently, I've just pre-loaded .dlls that contain all the classes in all
the plugins I'm using (in an RCP setup).  That way loadClass() requests
don't trigger class loading as they're already loaded.  However, that
isn't much good for a long term solution (kind of defets the purpose of
'plugins').

Any help, pointers etc. would be greatly appreciated.  I've only just
started poking around in the sources this last week.

Thanks,
-David.

PS: I also posted this to the platform news-group

_______________________________________________
platform-update-dev mailing list
platform-update-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-update-dev


Back to the top