Hi, please review the following patch. It generally coverts codes from shell to plain java. Bug: https://bugs.openjdk.java.net/browse/JDK-8169115 Webrev: http://cr.openjdk.java.net/~xiaofeya/8169115/webrev.00/ Thanks, Felix