Windows上的Linux子系统无法编译java代码

时间:2016-08-03 05:23:45

标签: windows bash javac

我已经安装了java,遵循我在SO上找到的所有ubuntu特定建议。但是,就像我javac Program.java一样,看起来我正在进入一个无限循环。只是打字输入,甚至不能打字离开(即使clt-c不起作用)。

Reverse.java

/**
 * This program echos the command-line arguments backwards.
 **/
public class Reverse {
  public static void main(String[] args) {
    // Loop backwards through the array of arguments
    for(int i = args.length-1; i >= 0; i--) {
      // Loop backwards through the characters in each argument
      for(int j=args[i].length()-1; j>=0; j--) {
        // Print out character j of argument i.
        System.out.print(args[i].charAt(j));
      }
      System.out.print(" ");  // add a space at the end of each argument
    }
    System.out.println();     // and terminate the line when we're done.
  }
}

我可以运行其他程序(Ruby,C ++,C等)。我在这里失踪了,我会感激任何帮助。 enter image description here

0 个答案:

没有答案