diff -r 9ff8d7c0ed79 -r c91fa0770046 hotspot/src/share/vm/services/management.cpp --- a/hotspot/src/share/vm/services/management.cpp Sat Apr 20 04:07:08 2013 -0700 +++ b/hotspot/src/share/vm/services/management.cpp Sat Apr 20 19:02:11 2013 +0200 @@ -2126,7 +2126,7 @@ THROW_MSG_(vmSymbols::java_lang_NullPointerException(), "Output file name cannot be null.", -1); } - char* name = java_lang_String::as_utf8_string(on); + char* name = java_lang_String::as_platform_dependent_str(on, CHECK_(-1)); if (name == NULL) { THROW_MSG_(vmSymbols::java_lang_NullPointerException(), "Output file name cannot be null.", -1);