Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Passing enums as arguments within a jni function

843829Jan 6 2009 — edited Jan 8 2009
I am trying to pass enum arguments from a Java/JNI function to a C function. For example,

public native void java_func(enum pname);

java_jni_func(JNIEnv * env, jobject panel, enum pname)
{
c_func(pname);
}

where
c_func(enum pname);

But I get the error message "illegal use of this type as an expression"

Any ideas on how I go about solving my problem.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2009
Added on Jan 6 2009
6 comments
3,542 views