You should declare a Java object as type JavaObject. For example:
Local JavaObject &MyJavaClass;
Note: Java objects can be declared as type Local only.