use standard api instead of platform dependent literal.

current code is not work on JRuby and Windows.
this PR works normally on JRuby and Windows.