Heinrich Schmetterling
Heinrich Schmetterling

Reputation: 6884

java.lang.reflect.InvocationTargetException - determine actual error?

I'm using Method.invoke() to call a function in a third party jar. Sometimes I get a java.lang.reflect.InvocationTargetException thrown. How can you figure out what the real exception was from this?

Upvotes: 1

Views: 1263

Answers (1)

Francis Upton IV
Francis Upton IV

Reputation: 19443

InvocationTargetException.getCause() it uses the normal exception chaining stuff introduced in 1.4

Upvotes: 5

Related Questions