Skip to main content



      Home
Home » Archived » BIRT » how to set multiple classpaths?
how to set multiple classpaths? [message #190567] Fri, 15 September 2006 10:45 Go to next message
Eclipse UserFriend
I solved most recognition problems with Jason's advice to put:
System.setProperty( EngineConstants.WEBAPP_CLASSPATH_KEY,

"c:/myclasses" );

My problem now is that I have to add third party jars located in the lib
directory in addition to my classes to my classpath.

Jason when is your book coming out?

Thanks,
Jim
Re: how to set multiple classpaths? [message #190591 is a reply to message #190567] Fri, 15 September 2006 11:11 Go to previous message
Eclipse UserFriend
Jim,

This is tricky because of the way Eclipse plugins do class loading.
Here is a good article on what Eclipse does.
http://www.eclipsezone.com/articles/eclipse-vms/

I needed to add to the classpath in one of my plugins and used code similar
to what is in the BIRT jdbc driver.

oldloader = thread.getContextClassLoader();

refreshURLs();

ClassLoader changeLoader = new URLClassLoader( (URL [])URLList.toArray(new
URL[0]),thread.getContextClassLoader());

thread.setContextClassLoader(changeLoader);


..

..

..

finally{

thread.setContextClassLoader(oldloader);

}

The refreshURLs function just builds the list to add to the classpath.

Jason

"James Leotta" <jleotta@bascom.com> wrote in message
news:eeee79$oji$1@utils.eclipse.org...
>I solved most recognition problems with Jason's advice to put:
> System.setProperty( EngineConstants.WEBAPP_CLASSPATH_KEY,
>
> "c:/myclasses" );
>
> My problem now is that I have to add third party jars located in the lib
> directory in addition to my classes to my classpath.
>
> Jason when is your book coming out?
>
> Thanks,
> Jim
Previous Topic:[2.1.0, ReportEngine] How load rptlibrary file in a Standalone application
Next Topic:Access to data set from javascript.
Goto Forum:
  


Current Time: Tue May 13 14:55:46 EDT 2025

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

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

Back to the top