+static void run_jprocess(JNIEnv *env, jobject jprocess)
+{
+ // wait for the process's start time
+ jfieldID jprocess_field_Process_startTime = jxbt_get_sfield(env, "org/simgrid/msg/Process", "startTime", "D");
+ jdouble startTime = env->GetDoubleField(jprocess, jprocess_field_Process_startTime);
+ if (startTime > MSG_get_clock())
+ MSG_process_sleep(startTime - MSG_get_clock());
+ //Execution of the "run" method.
+ jmethodID id = jxbt_get_smethod(env, "org/simgrid/msg/Process", "run", "()V");
+ xbt_assert((id != nullptr), "Method run() not found...");
+ env->CallVoidMethod(jprocess, id);
+}
+
+/** Create a Java org.simgrid.msg.Process with the arguments and run it */
+static int java_main(int argc, char *argv[])
+{