繼Getting started - (Windows 7中,控制檯:C:...>的.jar在同一文件夾& .javauto)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 =>幫助顯示爲OK)
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)
你有JAVA_HOME設置,以及PATH上的jdk? – azurefrog
我能想到的唯一的另一件事是,也許你的javac是一個很奇怪的地方,並且javauto在嘗試執行時錯誤地解析路徑? – azurefrog
Environment is OK(javac編譯在javauto外部): JAVA_HOME = C:\ Program Files(x86)\ Java \ jdk1.8.0_74 - - - Path = C:\ Program Files(x86)\ Java \ jdk1.8.0_74 \ bin – Francis