我目前正在阅读这篇文章,并尝试编译第一个示例
// file HelloWorld.x10
public class HelloWorld {
public static def main(args: Array[String](1)){
x10.io.Console.OUT.println("Hello, World");
}
}
我有 Linux Mint 16。我设置了export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
. 我已经从http://x10-lang.org/x10-development/building-x10-from-source.html?id=248下载了“Linux/x86_64 (tgz)”版本
我试图像这样编译它:
$ ./x10 HelloWorld.x10
Error: Cannot load main class for HelloWorld.x10 with classpath .:/home/moose/Downloads/x10-2.4.2_linux_x86_64/stdlib/x10.jar:/home/moose/Downloads/x10-2.4.2_linux_x86_64/lib/commons-math3-3.2.jar:/home/moose/Downloads/x10-2.4.2_linux_x86_64/lib/commons-logging-1.1.3.jar
和这个:
./x10c HelloWorld.x10
/home/moose/Downloads/x10-2.4.2_linux_x86_64/bin/HelloWorld.x10:3: Could not find type "Array(x10.lang.Long)".
1 error.
和这个
./x10c++ HelloWorld.x10
/home/moose/Downloads/x10-2.4.2_linux_x86_64/bin/HelloWorld.x10:3: Could not find type "Array(x10.lang.Long)".
1 error.
和这个:
./runx10 HelloWorld.x10
/home/moose/Downloads/x10-2.4.2_linux_x86_64/bin/HelloWorld.x10: line 1: //: Is a directory
/home/moose/Downloads/x10-2.4.2_linux_x86_64/bin/HelloWorld.x10: line 2: public: command not found
/home/moose/Downloads/x10-2.4.2_linux_x86_64/bin/HelloWorld.x10: line 3: syntax error near unexpected token `('
/home/moose/Downloads/x10-2.4.2_linux_x86_64/bin/HelloWorld.x10: line 3: ` public static def main(args: Array[String](1)){'
我应该如何运行/执行它?