how to access hashmap from c programming

i have created a hashmap in java and passed it to c++ through jni like

import java.util.*;  
class javasam{  
    private native void print(HashMap<String,String> hm);
    public static void main(String args[]){  
        HashMap<String,String> hm=new HashMap<String,String>();   
        new javasam().print(hm);
    static {

i have sent it as an object but i couldn't access it

#include "stdafx.h"
#include <stdio.h>
#include <jni.h>
#include "javasam.h"
#include <string.h>
#include <map>
#include <iostream>
JNIEXPORT void JNICALL Java_javasam_print (JNIEnv *s, jobject k, jobject l)
   jclass mapclass = s->GetObjectClass(l);
   jmethodID mid=s->GetMethodID(mapclass,"print","(Ljava/util/HashMap;)V");
   jobject ex=s->CallObjectMethod(l,mid);

how do i print the elements in it and access it