I am working on a project that should take an arbitrary number of java files, compile them, jar them, and then run them. The problem I am facing is this: in which class are we running? Is it possible to find an entry point in a set of classes?
I am ready to make the assumption that these files will have only one entry point.
Here is what I have reviewed so far:
- Add a helper class to each jar that uses reflection to find a class with main (). To start the jar, call this helper class.
- Enter the username in your main () class "Basic" or something like that.
Is there a good way to do this? This software is intended for students and novice programmers, so Iām ready to sacrifice reliability for simplicity.
Thanks!
source share