I want to load a .java file from a specified path and retrieve the methods declared in it. Please find below the sample.
There is a java file in a location D:/Sample/Test.java
I have declared two methods in it test1()
and test2()
.`
I know that by using classobj.getClass().getDeclaredMethods()
I can retrieve the methods declared in it. But my problem is in loading the .java
file.
Could anyone please provide me a solution for this..
Regards, Adarsh K S