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!

How do you access an array in an object with JNI

843829Apr 5 2005 — edited Apr 6 2005
I'm trying to figure out how I can access a byte array which resides as field within an object that I pass to a JNI method. The following is a definition of my java class:

public class VirusScanMessage {
public byte[] fileContent;
public int fileSize;
public String messages;
public String datLocation;
}

I can access the int and String fields of this object within the JNI C++ program by using the GetFieldId method. However, I can't figure out how to get access to the
byte array field 'fileContent'.

Anyone have any ideas, any help would be appreciated!

Thanks!

Mike
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 4 2005
Added on Apr 5 2005
2 comments
1,858 views