This is the code which I am trying out:
JavaCompiler compilerA = ToolProvider.getSystemJavaCompiler();
int resultA = compilerA.run(null,null,null,"/Users/a/Documents/Java/a.java");
System.out.println("Compile result code = " + resultA);
File fileA = new File("/Users/a/Documents/Java/a.class");
JavaCompiler compilerB = ToolProvider.getSystemJavaCompiler();
int resultB = compilerB.run(null,null,null,"/Users/a/Documents/Java/b.java");
System.out.println("Compile result code = " + resultB);
File fileB = new File("/Users/a/Documents/Java/b.class");
Here I am compiling a Java class and then using reflection to get all the function names, parameters and return types. However, I have no clue how to get the names and return types of the local variables of the functions. I tried looking up bytecode outline but it says it isn't available for netbeans. Please help me out.