Solved

Reading .class files, dynamically

Posted on 2006-11-12
3
170 Views
Last Modified: 2010-03-31
I'm trying to write a program that could read plugins, basically the program itself is just a GUI and all the work is done by other class files, the thing is I want the program to read every .class in a folder(or the same folder as the root, doesn't matter) dynamically, like for example I write a new class file, all I have to put it in there and the program will recognize it and use its methods.(to make things easier, all the method names are similar in every class file)

To make it more clear, I'll give you an overview of the program I'm writing, it basically has a combobox that has a list of all the class files in the folder, when I pick one of them it should use a method inside that certain class file that returns a panel which has some sort of an interface where I could do some operations, I'm going to keep adding new kinds of operations with time(which have different input, therefore different interface), but I don't want to edit the main file everytime I do so.

Thanks for your help in advance
0
Comment
Question by:za3moot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 125 total points
ID: 17925069
0
 

Author Comment

by:za3moot
ID: 17925451
Thanks a lot mate, I just deleted the huge code I wrote earlier today and replaced it with 10 lines of code :)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17926543
:-)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question