Skip to main content



      Home
Home » Eclipse Projects » Equinox » classloading
classloading [message #40101] Wed, 14 April 2004 12:22 Go to next message
Eclipse UserFriend
Originally posted by: sg.removeme.media-style.com

Hi,

based on Ted Stockwell information i had start to implement a jboss in
eclipse plugin (will be open
source ;) ).
Everything is fine so far but i run in trouble with some advanced
class-loading issues.

I start my jboss server with the plugin class loader as jboss root
classloader.
The jboss server set a system property to announce for the jvm to use
another
RMI Classloader. The problem is that this RMI classloader - class is
loaded by the System classloader
and this does not know about my jar files in the plugin.

Is there any chance to submit my jars to the system classloader or do i
have to add the jar to the start
classpath of eclipse?

Thanks for any hints.
Stefan
Re: classloading [message #40310 is a reply to message #40101] Tue, 20 April 2004 12:52 Go to previous message
Eclipse UserFriend
Actually, you have to set the thread context loader to your plugin for the
RMI stuff to see your classes:

ClassLoader cl = Thread.currentThread().getContextClassLoader();

try
{
Thread.currentThread().setContextClassLoader(getClass().getC lassLoader());
// do code below here that uses RMI/EJB stuff that will use my jar/classes
}
catch (Exception e)
{
}
finally
{
// set the old one back when all done
Thread.currentThread().setContextClassLoader(cl);
}

"Stefan Groschupf" <sg@removeme.media-style.com> wrote in message
news:c5jogv$4pc$1@eclipse.org...
> Hi,
>
> based on Ted Stockwell information i had start to implement a jboss in
> eclipse plugin (will be open
> source ;) ).
> Everything is fine so far but i run in trouble with some advanced
> class-loading issues.
>
> I start my jboss server with the plugin class loader as jboss root
> classloader.
> The jboss server set a system property to announce for the jvm to use
> another
> RMI Classloader. The problem is that this RMI classloader - class is
> loaded by the System classloader
> and this does not know about my jar files in the plugin.
>
> Is there any chance to submit my jars to the system classloader or do i
> have to add the jar to the start
> classpath of eclipse?
>
> Thanks for any hints.
> Stefan
>
>
Previous Topic:Database Query Language
Next Topic:customized plugin converter
Goto Forum:
  


Current Time: Tue Aug 05 02:38:52 EDT 2025

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

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

Back to the top