1

I've successfully downloaded the CyanogenMod 10 source tree by syncing the latest repo. I've also installed the Java JDK properly and already set a ANDROID_JAVA_HOME variable but still getting those errors while executing this command "make -j4 otatools"

/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: build/core/find-jdk-tools-jar.sh: Permission denied
build/core/config.mk:348: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com.  Stop.

I used these steps to register the downloaded version of Java as an alternative, and switching it to be used as the default

update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_60/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_60/bin/javac 1
update-alternatives --set java /opt/jdk1.7.0_60/bin/java
update-alternatives --set javac /opt/jdk1.7.0_60/bin/javac

Output for java -version

java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

Output for ANDROID_JAVA_HOME

echo $ANDROID_JAVA_HOME
/opt/jdk1.7.0_60/bin/

My Machine configuration is Debian Wheezy 64 bit with 4GB RAM

Falling Into Infinity
  • 697
  • 3
  • 13
  • 34

1 Answers1

0

Errrrrrrrm, correct me if I'm wrong but looking at your update-alternatives, you are actually setting your Java version to JDK 7

First make sure you have actually Java 6 installed, then try running:

sudo update-alternatives --config java

You should see something like this:

  Selection    Pad                                             Prioriteit Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
  1            /usr/lib/jvm/java-6-oracle/jre/bin/java          1         manual mode

Now type in the version you would like to use, for me that is : 1

type enter and then run java -version

Tell me if it worked!

EDIT: Whoops didn't even notice that this is a thread from 5 months ago...

Sorry for that!

Still Other people who have your problem could find my answer usefull though

caelin
  • 236
  • 1
  • 2
  • 13