[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: How to add jars and folders to classpath
|
"reindheer" <automatic@xxxxxxxxxxxxx> wrote in message
news:8402208.14671203943056988.JavaMail.root@xxxxxxxxxxxxxxxx
> Hi,
>
> We are developing a plugin, which requires jars and folders containing
> java files to be added to classpath. We thought of using preferences.
> However no idea how to modify classpath at runtime.
>
> Does this require writing your own classloader or eclipse does provide
> some API.
>
> Could you please point out, how to add jars or folders to classpath at
> runtime. Thanking you in advance.
By "at runtime" do you mean after the application has already started, i.e.,
too late to change the classpath that you load the application with? If so,
then yes, AFAIK you will need to use your own classloader. You don't
actually need to write the classloader yourself, you can just use an
URLClassLoader.