Results 1 to 1 of 1
Thread: Adding jars at runtime
- 02-17-2010, 07:25 PM #1
Member
- Join Date
- Feb 2010
- Posts
- 1
- Rep Power
- 0
Adding jars at runtime
Hi,
periodical I'm getting jars, which contain Java-Applications. Now I want to search these jars for more jars and add them to my classpath using a Java Standalone program. After that I want to get the included classes using Class.forName and analyze them by reflection.
I already managed it to search the jars for classes. But when I tried to get the classes by Class.forName, I got errors. The cause was the dependencies of some classes via imports. I haven't had the dependencies in my classpath, because I don't know these dependencies at runtime.
That's why I want to put all dependend jars into my classpath. Currently I get all jars that I need via a for loop as strings (complete path and jar name).
Now what I have to do to put these jars within my for loop into my classpath at runtime? I'd like to get the whole jars, not only a few classes from within these jars.
Regards
Tom
Similar Threads
-
Problem in adding new JTextPane at Runtime
By png in forum AWT / SwingReplies: 13Last Post: 12-14-2009, 12:14 PM -
Adding component at runtime
By Beju in forum Java AppletsReplies: 5Last Post: 06-16-2009, 11:28 AM -
More efficient in memory? Multiple Jars or Single Jars with lot's of Classes
By dark_cybernetics in forum New To JavaReplies: 0Last Post: 08-19-2008, 04:44 PM -
Preblem with JARs
By bizmut in forum EclipseReplies: 1Last Post: 06-04-2008, 05:41 PM -
Adding JARs to the classpath at runtime?
By johann_p in forum Advanced JavaReplies: 1Last Post: 06-26-2007, 10:42 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks