- jobject jprocess; /* the global reference to the java process instance */
- jstring jname; /* the name of the java process instance */
- msg_host_t host; /* Where that process lives */
-
-
- /* get the name of the java process */
- jname = jprocess_get_name(jprocess_arg, env);
- if (!jname) {
- jxbt_throw_null(env, xbt_strdup("Process name cannot be nullptr"));
- return;
- }
- const char* name = env->GetStringUTFChars(jname, 0);
-
- /* bind/retrieve the msg host */
- const char* hostname = env->GetStringUTFChars((jstring)jhostname, 0);
- host = MSG_host_by_name(hostname);
- if (!(host)) { /* not bound */
- jxbt_throw_host_not_found(env, hostname);
- return;
- }
- env->ReleaseStringUTFChars((jstring)jhostname, hostname);
-