Consider the following code:
use org::apache::activemq::ActiveMQConnectionFactory:from<java>:jar('activemq-all-5.9.0.jar');
my $connFactory = ActiveMQConnectionFactory.'constructor/new/(Ljava/lang/String;)V'('tcp://localhost:61616');
my $conn = $connFactory.'method/createConnection/()Ljavax/jms/Connection;'(); # javax.jms.Connection is an interface
$conn.'method/close/()V'();
The last line fails with the following error:
java.lang.IncompatibleClassChangeError: Found interface javax.jms.Connection, but class was expected
[1] http://docs.oracle.com/javaee/7/api/javax/jms/ConnectionFactory.html
[2] http://docs.oracle.com/javaee/7/api/javax/jms/Connection.html