build.xml Javac not find error

156 views
Skip to first unread message

Иван Дунский

unread,
Jul 15, 2013, 12:03:21 PM7/15/13
to codenameone...@googlegroups.com
Hello! I'm new in CodenameOne. Tried to create my first app and received an error 
   
     [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!

Tried to add JRE library but received the same result. My native Java Android applications run successfully. What's possible way to solve this? 

Shai Almog

unread,
Jul 15, 2013, 12:44:59 PM7/15/13
to codenameone...@googlegroups.com
Hi,
we need to use the actual javac compiler and not ADT since some of our server code has some issues with ADT.

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).
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.

Krzysztof Zieliński

unread,
Nov 21, 2013, 4:09:28 PM11/21/13
to codenameone...@googlegroups.com
I had the same error.
1.Please set correct path to Java\bin directory in JAVA_HOME and PATH

eg:
JAVA_HOME=....\Java\jdk1.7.0_45\
and
PATH=,,,,;%JAVA_HOME%\bin

2.restart windows

Shai Almog

unread,
Nov 22, 2013, 2:31:44 AM11/22/13
to codenameone...@googlegroups.com
You need to make sure the javac path is set correctly in the build.xml. Did you try setting the JAVA_HOME?
Reply all
Reply to author
Forward
0 new messages