Solved

Reading .class files, dynamically

Posted on 2006-11-12
3
164 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
  • 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

759 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now