Connecting Tech Pros Worldwide Forums | Help | Site Map

Dynamic classpath for jars

Alex Ostrikov
Guest
 
Posts: n/a
#1: Jul 17 '05
Hi, all !!!

Question: I copy some jars with classes inside during my java program runs.
How can I dynamically load these classes from jar?

Thanx.



FISH
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Dynamic classpath for jars


"Alex Ostrikov" <aostrik@hotmail.com> wrote in message news:<OGaAb.11722$Yt4.5876@lakeread05>...[color=blue]
> Hi, all !!!
>
> Question: I copy some jars with classes inside during my java program runs.
> How can I dynamically load these classes from jar?
>
> Thanx.[/color]


Using a class loader which scans the necessary directories for
new/updated Jar files. I'm not sure if such class loader function-
ality exists within J2SE - you may find an example of a bespoke
class loader by searching Google. Certainly there are class loaders
which can fetch classes from a Jar file pointed at by a given URL,
but they require the software to know/'be told' the location of the
Jar - they don't hunt for it themselves.


-FISH- ><>
Closed Thread


Similar Java bytes