I would like to instantiate a new class object form external location collected from user input. The program asks the user where the file is, say /tmp/MyTestClass.java. I would then like it to grab that .java file and make it a usable class with in the program. so i could call something like MyClass = new MyTestclass(). I've been looking around and can't seem to find an answer or if its even possible? Any information would be useful.
Thanks!!
-----------EDIT---------------
I may have been over thinking my problem. This is for a JUnit test (sorry should have mentioned this before). Below is an example of what i was using to pull in my static class. I would like to be able to dynamically pull the JUnit test file from user input. testcastjunit was the name of the class. I need to be able to programmaticly get the class from the users input and run the test case.
org.junit.runner.Result result = JUnitCore.runClasses(**testcastjunit.class**);
for (Failure failure : result.getFailures()) {
System.out.println(failure.toString());
}