Java problem
There are three main mistakes in the Building Owners Code:

1。 All quotation marks should use half-angle symbols, that is, English quotation marks, not English quotation marks.

2。 As follows:

Exception in thread "main" java.lang, error: unresolved compilation problem:

Unhandled exception type NoSuchMethodException

Unhandled exception type IllegalAccessException

Unhandled exception type InvocationTargetException

They all throw exceptions when calling methods, and they are not actively caught.

There are two solutions:

1。 As xjrgame answered, the capture exception is displayed.

2。 It is simple and direct to continue throwing exceptions, but it is not recommended in complex programs. The method is changed as follows:

Import java.util. *;

Import java.lang.reflect. *;

Common class reflector (

The public static void main (strinargs []) throws a SecurityException.

NoSuchMethodException,IllegalArgumentException,

IllegalAccessException,InvocationTargetException {

Set< string & gts = new HashSet & lt string & gt ();

s . add(" foo ");

Iterator it = s.iterator ();

Method m = it.getClass (). get method(" has next ");

system . out . println(m . invoke(it));

}

}

You can see that after the main method, all the exceptions that will happen in the main method are thrown and handed over to the jvm for processing.

3。 After the above modification, the operation will throw a java.lang.illegalaccessexception exception, which is a question of access rights. I haven't studied this problem yet, so I can't say it casually.

The landlord must have learned to reflect. I have only a little contact with jni. I hope more experts can help you.