Can't find javac

65 views
Skip to first unread message

yis...@digilabs.com

unread,
Jul 17, 2015, 8:20:12 PM7/17/15
to codenameone...@googlegroups.com
This thing drives me crazy. Anyone has any idea?

Mac OS (10.10.4) /  JDK 1.8.0_24 / Eclipse (4.2.1). Running one of the demos. Can run in the simulator with no problem, but the build.xml will fail (always and when I try to do a Send IOS Debug Build.
 The message get is:

/Users/yishai/Documents/workspace/Yishais-Mac/Mobile/WedShare/build.xml:145: Unable to find a javac compiler;

com.sun.tools.javac.Main is not on the classpath.

Perhaps JAVA_HOME does not point to the JDK.

It is currently set to "/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre"


Now, my JAVA_HOME is the JDK. See below:

Yishais-Mac:~ yishai$ echo $JAVA_HOME

/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home


In Eclipse, any place I looked for the JRE to use it points to the JDK. I copied the tools.jar from the JDF into the JRE location, and I still get the same error.


 Where else can I look for? Any suggestions on how to troubleshoot it? 


Thanks


-Yishai

Shai Almog

unread,
Jul 18, 2015, 12:48:00 AM7/18/15
to codenameone...@googlegroups.com, yis...@digilabs.com, yis...@digilabs.com
Are you using the latest version of the Eclipse plugin?
Older versions didn't support JDK 8 only JDK 7.

Assuming this is the most recent version try going into project properties and clicking OK. It should offer to update the build.xml which you should accept and this should then work.

yis...@digilabs.com

unread,
Jul 19, 2015, 12:21:24 AM7/19/15
to codenameone...@googlegroups.com, yis...@digilabs.com
Thanks Shai.

Updated to the latest version. Not sure how I can see what;s installed now but it whatever the latest one you get when you let Eclipse update. Went into project Properties and did Okay. Did not offer to update the build. Still the same problem. Note that the simulaor works with Java 1.8, its just when I try to run the build. Any other suggestion?

Yishai

Chen Fishbein

unread,
Jul 19, 2015, 5:37:10 AM7/19/15
to codenameone...@googlegroups.com, yis...@digilabs.com, yis...@digilabs.com

yis...@gmail.com

unread,
Jul 20, 2015, 5:10:08 PM7/20/15
to codenameone...@googlegroups.com, yis...@digilabs.com
Thanks Chen.

Yes. Adding the tools.jar to ants classpath global entries eventually worked. Still can not figure out why would it think the JRE is the one to use... Anyway, works now. Thanks.


Reply all
Reply to author
Forward
0 new messages