我在最近的JDK升级后遇到了Codenameone的问题。试图以多种方式解决它,但没有运气。
jar:
[echo] Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
[echo] code size and wider device support
[copy] Copying 2 files to C:\Appstek\Workspace\AppsMobile\build\tmp
[javac] C:\Appstek\Workspace\AppsMobile\build.xml:130: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 13 source files to C:\Appstek\Workspace\AppsMobile\build\tmp
[javac] Error: Could not find or load main class com.sun.tools.javac.Main
BUILD FAILED
C:\Appstek\Workspace\AppsMobile\build.xml:130: Compile failed; see the compiler error output for details.
Total time: 1 second
答案 0 :(得分:2)
我猜你正在使用Eclipse,而你的JAVA_HOME环境变量指向你机器上安装的JRE而不是JDK。确保JDK的java / javac命令首先在您的OS路径中(在JRE命令之前),并确保JAVA_HOME指向JDK目录,然后运行Eclipse。