View Single Post
  #1 (permalink)  
Old 08-01-2007, 05:30 PM
palindrome palindrome is offline
Member
 
Join Date: Aug 2007
Posts: 6
palindrome is on a distinguished road
Use classes without recompiling?
Hi, I have a situation where I'd like to use classes without having to compile them into my program (they may be created afterward). My program knows the superclass, so I am creating them with Class.forName and invoking the constructor then casting the resulting object.

However, simply giving the class name as a string doesn't tell my program how to actually find the classes. I thought of uncompressing the jar file, adding the classes to the manifest and then recompressing the jar file, which is better than having to recompile, but I'd prefer something simpler, like editing a file outside of the jar.

Is there a simple way to do this?
Reply With Quote
Sponsored Links