jdk-5 error while building android source code

Discussion in 'Android Roms' started by preetb123, Mar 16, 2011.

  1. preetb123

    preetb123 New Member

    Joined:
    Feb 13, 2011
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Hi, i am trying to build linux kernel for android emulator(Eclair version). i have downloaded the android source code, and also "$repo sync" was successful. now for Building, when i try to execute "$make" command i get the following error.
    root@ubuntu:~/mydroid# make

    PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=2.1-update1 TARGET_PRODUCT=generic TARGET_BUILD_VARIANT=eng TARGET_SIMULATOR= TARGET_BUILD_TYPE=release TARGET_ARCH=arm HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release
    BUILD_ID=ECLAIR

    Checking build tools versions...
    You are attempting to build with the incorrect version of java.
    Your version is: /bin/bash: java: command not found. The correct version is: 1.5.
    Please follow the machine setup instructions at http://source.android.com/download
    build/core/main.mk:111: * stop. Stop.
    i had open-jdk6 and sun-jdk-6 installed, now for building android source, it needs sun-jdk-1.5. for this i tried to install sun-jdk-1.5 from the .bin file, but the default JVM is not initialised to jdk-1.5, and i am not able to do it. i uninstalled open-jdk-6 but i couldnt remove sun-jdk-6. i have installed sun-jdk-6 from a .bin file from oracle/downloads.
    i am following steps from below link
    LINUX CLUES: Building Android in Debian Sid
    please tell me how can i uninstall jdk-6 and set the default jvm path to sun-jdk-5. or is there any other way to set the default jvm.. please help.