Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Class.newInstance()

Status
Not open for further replies.

flanakin

Programmer
Mar 21, 2000
158
US
Is it possible to use Class.newInstance() on a class located in another JAR? I'm having problems with it. I can do it with my own classes, just not those in another JAR. I imagine this is possible, but am not sure the best way to go about it. Any help is appreciated! Thanks in advance.

________________________________________
Michael Flanakin
 
Is the .jar file you want to reference in your classpath? If so, I think you should be able to do what you want.

_________________
Bob Rashkin
rrashkin@csc.com
 
I found my problem. I was migrating code from one system to a reusable JAR and it turns out the object I was casting was of the old type and not the new type that was copied to the reusable JAR. Hope that makes sense. Thanks for the help, tho!

________________________________________
Michael Flanakin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top