CodenameOne :“找不到 javac 的路径"错误 [英] CodenameOne :"Path to javac not found" error

查看:46
本文介绍了CodenameOne :“找不到 javac 的路径"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始使用用于多平台移动开发的 CodenameOne 工具.当我创建hello world"应用程序并尝试构建 .apk android 文件时,我收到了

I start working with CodenameOne tool for multiplatform mobile dev. When I created "hello world" app and tried to build an .apk android file, I received

 [echo]       Error! Path to Javac not found! 
 [echo]       Make sure the JAVA_HOME enviroment variable is pointing to the JDK 
 [echo]       or define javac path in build.xml manually!

我在项目中添加了 JRE 引用,但这并没有解决问题.我该如何解决?

I added JRE reference to the project, but this didn't solve the issue. How can I solve it?

推荐答案

Codename One 需要使用实际的 javac 编译器而不是 ADT,因为我们的一些服务器代码在 ADT 方面存在一些问题.

Codename One needs to use the actual javac compiler and not ADT since some of our server code has some issues with ADT.

JRE 不包含 javac,您需要安装 JDK(如果您还没有安装),然后确保您的操作系统定义了 JAVA_HOME 环境变量,以便它指向 JDK 目录的根目录(不是bin目录).

The JRE doesn't contain javac, you need to install a JDK (if you don't have one already) then make sure your OS defines the JAVA_HOME environment variable so it points at the root of the JDK dir (not the bin directory).

如果这不起作用(您可能需要重新启动 Eclipse 以更新过程中的环境),那么只需双击 build.xml 文件并查找 jdk.将路径更新为正确的 JDK 路径.

If this doesn't work (you might need to restart Eclipse to update environment within the process), then just double click the build.xml file and look for jdk. Update the path to the proper JDK path.

这篇关于CodenameOne :“找不到 javac 的路径"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆