# Cannot find tools.jar?



## mbroeders

Hi all,
Recently, I started building android myself. All went fine, but i could not properly configure graphics in ubuntu 10.04. So yesterday I installed Ubuntu 11.10. Thanks to this thread from Roman (http://rootzwiki.com/topic/12347-fixes-for-compiling-ics-403-on-ubuntu-1110/) I thought I would be able to build with 11.10. However, I keep getting errors regarding tools. jar:



Code:


<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
/bin/bash: build/core/find-jdk-tools-jar.sh: Permission denied<br />
build/core/config.mk:268: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com.  Stop.<br />

Let me give some more info:
- I have properly setup java 6 jdk u 30
- when I manually run find-jdk-tools-jar.sh it gives the correct output ($JAVA_HOME/lib/tools.jar)
- I tried changing the line in find-...-jar.sh from ANDROID_JAVA_HOME/lib to JAVA_HOME/lib, doesn't change anything

Could anybody help me out with this issue? I have been searching all morning and just cannot find the proper solution. Thanks in advance!!!
Mark


----------



## Adam80460

Did you ever find a solution for your issue? ..I'm having a similar problem ...its getting kind annoying lol

Sent from my Galaxy Nexus using RootzWiki


----------



## mbroeders

Adam80460 said:


> Did you ever find a solution for your issue? ..I'm having a similar problem ...its getting kind annoying lol
> 
> Sent from my Galaxy Nexus using RootzWiki


Yeah, it definitely was annoying! I managed to fix it by re-installing / re-downloading everything. It had something to do with disk permissions i guess. Anyway, I created a new directory and resynced the repo. That ultimately fixed it.


----------



## simonsimons34

mbroeders said:


> Hi all,
> Recently, I started building android myself. All went fine, but i could not properly configure graphics in ubuntu 10.04. So yesterday I installed Ubuntu 11.10. Thanks to this thread from Roman (http://rootzwiki.com...on-ubuntu-1110/) I thought I would be able to build with 11.10. However, I keep getting errors regarding tools. jar:
> 
> 
> 
> Code:
> 
> 
> <br />
> /bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
> /bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
> /bin/bash: prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc: Permission denied<br />
> /bin/bash: build/core/find-jdk-tools-jar.sh: Permission denied<br />
> build/core/config.mk:268: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com.  Stop.<br />
> 
> Let me give some more info:
> - I have properly setup java 6 jdk u 30
> - when I manually run find-jdk-tools-jar.sh it gives the correct output ($JAVA_HOME/lib/tools.jar)
> - I tried changing the line in find-...-jar.sh from ANDROID_JAVA_HOME/lib to JAVA_HOME/lib, doesn't change anything
> 
> Could anybody help me out with this issue? I have been searching all morning and just cannot find the proper solution. Thanks in advance!!!
> Mark


So, I am building on gentoo (THIS ISNT A GENTOO SPECIFIC FIX) right now and I had this issue. Wasn't a hard fix really. issue this command

`ANDROID_JAVA_HOME=$JAVA_HOME`
proffit?!?!? this is the proper way to fix it in most cases. While looking at the source code in the build folder to fix this issue I noticed that the script was searching the variable ANDROID_JAVA_HOME that in itself is stupid. Why they did that, beats me. Anyways, that would be the fix. Thought I would share so everyone who lands here from google (how I found it) will have the proper answer.


----------

