Javauto编译失败(入门)

时间:2016-02-17 21:59:12

标签: java compiler-errors

关注Getting started - (Windows 7,控制台:C:...>,。jar& .javauto在同一文件夹中)

java -jar javauto.jar              => OK, help is displayed 
javauto hello.javauto              => command not recognised                   
javauto.jar hello.javauto          => NO result

所以我试过这个

java -jar javauto.jar -v hello.javauto

给出此例外(注意:c:...> javac =>帮助显示正常)

Generating ←[92mhello←[0m...
Getting user imports...  None
Getting user global variables...  None
Getting user functions...  None
Generating functions...  ←[93mmouseMove ←[0m←[93mmsgBox ←[0m←[93mprint ←[0m←[93msleep ←[0m
Generating class variables...  ←[93msimulatedMotionSpeed ←[0m
Generating imports...  ←[93mAWTException ←[0m←[93mMouseInfo ←[0m←[93mRobot ←[0m←[93mJDialog ←[0m←[93
mJOptionPane ←[0m
Generating struct objects... None
Generation complete... starting build
Executing cmd /c attrib +s +h  "C:\Users\Francis\Develop\java\Javauto\.hello"...
Building  ←[92mC:\Users\Francis\Develop\java\Javauto\.hello\class\hello.class←[0m...
Exception in thread "main" java.lang.NullPointerException: Couldn't find java system compiler.
    at com.automation.javauto.compiler.CustomJavaCompiler.compile(CustomJavaCompiler.java:36)
    at com.automation.javauto.parser.Create.main(Create.java:419)

1 个答案:

答案 0 :(得分:0)

试试这个:

1)使用此命令编译它:

java -jar javauto.jar  hello.javauto              

2)现在您已经编译了程序,将会有一个名为 hello.jar 的文件。执行:

java -jar hello.jar