Reputation: 181
I have an issue with loading classes via Class.forName(String className)
when I amtrying to get a class from another package. It keeps throwing a ClassNotFoundException
, even though I am fully declaring qualified (package) names as the class name.
Is there any way to load classes from another package?
Basically, what I am trying to do is load a bunch of different class files using a configuration. This isn't explicitly necessary (I'm just fooling around with code) but I would like to know if this is possible or not.
As a last note, I am fairly new to code development, having only just begun back in November, with Java as my first language.
Upvotes: 1
Views: 1836
Reputation: 81674
It is totally possible. Two things to check:
Upvotes: 1