src/java.base/share/classes/java/lang/Runtime.java
changeset 53018 8bf9268df0e2
parent 52427 3c6aa484536c
child 55231 02db50f278f9
child 58678 9cf78a70fa4f
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
   401      * @see     ProcessBuilder
   401      * @see     ProcessBuilder
   402      * @since 1.3
   402      * @since 1.3
   403      */
   403      */
   404     public Process exec(String command, String[] envp, File dir)
   404     public Process exec(String command, String[] envp, File dir)
   405         throws IOException {
   405         throws IOException {
   406         if (command.length() == 0)
   406         if (command.isEmpty())
   407             throw new IllegalArgumentException("Empty command");
   407             throw new IllegalArgumentException("Empty command");
   408 
   408 
   409         StringTokenizer st = new StringTokenizer(command);
   409         StringTokenizer st = new StringTokenizer(command);
   410         String[] cmdarray = new String[st.countTokens()];
   410         String[] cmdarray = new String[st.countTokens()];
   411         for (int i = 0; st.hasMoreTokens(); i++)
   411         for (int i = 0; st.hasMoreTokens(); i++)