Bug 481689 - Use JDT compiler to compile Java code for Android
Summary: Use JDT compiler to compile Java code for Android
Status: RESOLVED NOT_ECLIPSE
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Thym (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Gorkem Ercan CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2015-11-09 04:32 EST by Kaloyan Raev CLA
Modified: 2022-06-16 11:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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