This problem occurs when we compile the android source code.
Build/CORE/config. mk: 271:
* ** Error: cocould not find JDK tools. jar, please install jdk6, which you can download from java.sun.com. Stop.
In the final analysis, JDK 6 is not installed, or is not installed. Therefore, we need to install JDK 6 again. The Android Developers website is not installed successfully. Therefore, we need to install JDK 6 manually, manual installation involves the following steps:
First:Download and manually install JDK 6 ,:
Http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html
Now, go to the download directory. After that, decompress the package.
Ii. decompress:
To the downlaod Directory: CD download
Modify permissionsSudo chmod U + x JDK *****. Bin
Start decompression:./JDK *****. Bin
After decompression, a folder jdk1.6.0-version is generated.
Iii. Mobile JDK
First, check whether the/usr/bin/JVM directory exists.
Sudo mkdir/usr/bin/JVM
After the jdk1.6.0 is created, move it to this directory.
Sudo MV jdk1.6.0/usr/bin/JVM/
Iv. Configure Environment Variables
Returns the Home Directory, CD
Open the file configuration environment: sudo gedit/etc/profile
Add the following at the end of the file:
Export java_home =/usr/lib/JVM/jdk1.6.0
Export jre_home =$ {java_home}/JRE
Export classpath =. :$ {java_home}/lib :$ {jre_home}/lib
Export path =$ {java_home}/bin: $ path
Save and exit
Input: Source ~ /. Bashrc
5. Configure the default JDK version:
Ubuntu may have a default JDK, such as openjdk. To set the JDK we installed as the default JDK version, perform the following work.
RunCode:
Sudo Update-alternatives -- install/usr/bin/Java/usr/lib/JVM/jdk1.6.0/bin/Java 300
Sudo Update-alternatives -- install/usr/bin/javac/usr/lib/JVM/jdk1.6.0/bin/javac 300
Sudo Update-alternatives -- install/usr/bin/Jar/usr/lib/JVM/jdk1.6.0/bin/jar 300
Sudo Update-alternatives -- install/usr/bin/javah/usr/lib/JVM/jdk1.6.0/bin/javah 300
Sudo Update-alternatives -- install/usr/bin/javap/usr/lib/JVM/jdk1.6.0/bin/javap 300
Run the Code:
Sudo Update-alternatives -- config Java
Select a version.
Vi. Test
Enter Java-version
If the Java version is better than yours, it will be successful!