Solved

Reading .class files, dynamically

Posted on 2006-11-12
3
169 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

733 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