Hello,
I have a class in a package that has the name of each class in another package as a combobox, so I withdraw after selecting a user name string in my class. After that, I want to access a method (common to each class of another package).
Here is my part of the code
The problem is that Eclipse is not importing the package , it gives me: The method ListOptions () is undefined for the type Class. If you guys have a solution for this then it would be great. Thanks in advance.Code:String cnm = "Max"; / / An example of one of the names of classes try { Class cl = Class.Class.forName(cnm); optionsV = cl.ListOptions(); / / This method returns a vector (optionV) } catch (Final Exception ex) { throw new Exception(Java Class not found: " + cnm); }
Bookmarks