Bug 481689

Summary: Use JDT compiler to compile Java code for Android
Product: z_Archived Reporter: Kaloyan Raev <kaloyan>
Component: ThymAssignee: Gorkem Ercan <gorkem.ercan>
Status: RESOLVED NOT_ECLIPSE QA Contact:
Severity: enhancement    
Priority: P3 CC: gorkem.ercan
Version: unspecifiedKeywords: usability
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Kaloyan Raev CLA 2015-11-09 04:32:18 EST
Currently, running a mobile app on Android Emulator/Device, or exporting it as an Android application, requires JDK to be installed and the JAVA_HOME environment variable to be set to the JDK installation folder.

If the above requirements are not met then the action will fail with the following error in the executed Ant script:

BUILD FAILED
/home/raev/android-sdks/tools/ant/build.xml:716: The following error occurred while executing this line:
/home/raev/android-sdks/tools/ant/build.xml:730: 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 "/home/raev/Zend/ZendStudio 13.0.1/jre"

Non-java developers are puzzled by this message and don't really understand what is expected by them.

Is it possible to compile the Java code using the JDT compiler instead of using the javac tool (requiring a JDT installation)?
Comment 1 Gorkem Ercan CLA 2015-11-09 05:40:47 EST
Android builds are delegated to the build infrastructure on the android SDK. We have very limited control in them. Android has actually started to use gradle we have not yet caught up with that. 

We also plan to move to use Cordova CLI tools to manage plugins and cordova builds https://bugs.eclipse.org/bugs/show_bug.cgi?id=480148
Comment 2 Gorkem Ercan CLA 2016-01-17 20:06:55 EST
Closing, this needs to be supported on Android build system