snoopybad77 wrote:The thing is: the FileChooser can give you a file path, but can't tell you how much of that file path relates to the java package, and how much is the base directory of the class tree. And, as others have pointed out, there's almost always multiple .class files involved. A single Java source file alone will often generate several .class files. If you want a user to chose a plug-in you're almost certainly better to have them select a .jar file. Such a jar file can contain a services directory with a list of classes that implement the plug-in interface in question. You can simply create a URLClassLoader to access the classes in the jar or jars.
I want to load classes selecting them by a FileChooser.