Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » hot deployment in rcp-application
hot deployment in rcp-application [message #443954] Tue, 07 February 2006 14:07 Go to next message
Eclipse UserFriend
Originally posted by: reg.allorange.de

Hallo there,

In my RCP-application should be a folder where classes (e.g. jdbc-driver=
s) =

can be dropped during runtime. I've tried some ways to put this folder =

into classpath, all attempts were to no avail.. In every case, when I d=
o =

Class.forName([classname]); I get a ClassNotFoundException.
My last try seem to be auspicious. In Eclipse-Help I read about =

Eclipse-Runtime-Options and the flag osgi.dev which I can set in the =

config.ini of the RCP-application:

osgi.dev {-dev}
if set to the empty string, dev mode is simply turned on. This property =
=

may also be set to a comma-separated class path entries which are added =
to =

the class path of each plug-in or a URL to a Java properties file =

containing custom classpath additions for a set of plug-ins. For each =

plug-in requiring a customized dev time classpath the file will contain =
an =

entry of the form
<plug-in id>=3D<comma separated list of classpath entries to add>
where plug-in id "*" matches any plug-in not otherwise mentioned.

So I added the folder I want to have in classpath in many ways to the =

config.ini:

osgi.dev=3D/base/drivers/
osgi.dev=3D./drivers/
osgi.dev=3D../drivers/
osgi.dev=3D<full-path>/drivers/
....

or the jar-file itself:

osgi.dev=3Dfile:/base/drivers/xxx.jar!/
osgi.dev=3D/base/drivers/xxx.jar
osgi.dev=3D./drivers/xxx.jar
....

Everything fails!! Now I'm messed up - Can anybody tell me how I can loa=
d =

these classes in my app? A real hot deployment isn't neccessary. If a =

restart of the app is needed - it's ok. But I can't include these classe=
s =

into the project because I do not know, which will be needed during =

runtime - that's users choice...

I'll be happy about any good idea...

Thx in advance
Re: hot deployment in rcp-application [message #443996 is a reply to message #443954] Tue, 07 February 2006 21:01 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
I'd recommend writing your own classloader, and have that pick up the classes from your location; if not found there, delegate to the parent (Eclipse) one.

There's two classloaders in Eclipse; the OSGI Bundle and Eclipse classloaders. The Eclipse one delegates to the OSGI one, and falls back if it's not found to look for Eclipse-specific bindings like os/ws/arch folders for DLLs.

Have a google for how to write Java classloaders is probably your best bet.

Alex.
Previous Topic:Refactoring actions
Next Topic:Desgin an RCP application?
Goto Forum:
  


Current Time: Thu Nov 14 04:41:32 GMT 2024

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

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

Back to the top