/* Java Wrappers to the MSG API. */
-/* Copyright (c) 2007-2014. The SimGrid Team.
+/* Copyright (c) 2007-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <locale.h>
#include "smx_context_java.h"
-#include "smx_context_cojava.h"
#include "jmsg_process.h"
(*env)->GetJavaVM(env, &__java_vm);
- if ((*env)->FindClass(env, "java/dyn/Coroutine"))
- smx_factory_initializer_to_use = SIMIX_ctx_cojava_factory_init;
- else
- smx_factory_initializer_to_use = SIMIX_ctx_java_factory_init;
+ smx_factory_initializer_to_use = SIMIX_ctx_java_factory_init;
jthrowable exc = (*env)->ExceptionOccurred(env);
if (exc) {
(*env)->ExceptionClear(env);
argc++;
argv = xbt_new(char *, argc + 1);
- argv[0] = strdup("java");
+ argv[0] = xbt_strdup("java");
for (index = 0; index < argc - 1; index++) {
jval = (jstring) (*env)->GetObjectArrayElement(env, jargs, index);
tmp = (*env)->GetStringUTFChars(env, jval, 0);
- argv[index + 1] = strdup(tmp);
+ argv[index + 1] = xbt_strdup(tmp);
(*env)->ReleaseStringUTFChars(env, jval, tmp);
}
argv[argc] = NULL;
free(argv);
- if (smx_factory_initializer_to_use == SIMIX_ctx_cojava_factory_init)
- XBT_INFO("Using Coroutines. Your simulation is on steroid.");
- else if (smx_factory_initializer_to_use == SIMIX_ctx_java_factory_init)
+ if (smx_factory_initializer_to_use == SIMIX_ctx_java_factory_init)
XBT_INFO("Using regular java threads. Coroutines could speed your simulation up.");
else
xbt_die("Unknown context factory. Please report bug.");
return 0;
}
-