Commit e87c5e96d1f93d45f6babc412df631d7c5cbe3e7
1 parent
21ec030a
Exists in
master
and in
5 other branches
Ajustes para a interface java em windows
Showing
1 changed file
with
23 additions
and
2 deletions
Show diff stats
src/java/plugin.cc
@@ -396,10 +396,31 @@ extern "C" { | @@ -396,10 +396,31 @@ extern "C" { | ||
396 | 396 | ||
397 | #if defined( WIN32 ) | 397 | #if defined( WIN32 ) |
398 | 398 | ||
399 | - g_mkdir_with_parents("./jvm-exports",0777); | 399 | + gchar * exports = NULL; |
400 | + char buffer[1024]; | ||
401 | + | ||
402 | + if(GetModuleFileName(NULL,buffer,sizeof(buffer)) < sizeof(buffer)) { | ||
403 | + | ||
404 | + gchar * d = g_path_get_dirname(buffer); | ||
405 | + | ||
406 | + exports = g_build_filename(d,"jvm-exports",NULL); | ||
407 | + | ||
408 | + g_free(d); | ||
409 | + | ||
410 | + } else { | ||
411 | + | ||
412 | + exports = g_build_filename(".","jvm-exports"); | ||
413 | + | ||
414 | + } | ||
415 | + | ||
416 | + debug("java.class.path=%s;%s",dirname,exports); | ||
417 | + | ||
418 | + g_mkdir_with_parents(exports,0777); | ||
400 | 419 | ||
401 | options[vm_args.nOptions++].optionString = g_strdup_printf("-Djava.library.path=%s","."); | 420 | options[vm_args.nOptions++].optionString = g_strdup_printf("-Djava.library.path=%s","."); |
402 | - options[vm_args.nOptions++].optionString = g_strdup_printf("-Djava.class.path=./jvm-exports;%s",dirname); | 421 | + options[vm_args.nOptions++].optionString = g_strdup_printf("-Djava.class.path=%s;%s",dirname,exports); |
422 | + | ||
423 | + g_free(exports); | ||
403 | 424 | ||
404 | #elif defined(DEBUG) | 425 | #elif defined(DEBUG) |
405 | 426 |