Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Mobile
User Name
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Firefox OS, Sailfish OS, Maemo, MeeGo, Ubuntu Mobile, WebOS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site:


  Search this Thread
Old 03-16-2011, 10:44 AM   #1
LQ Newbie
Registered: Jan 2011
Posts: 28

Rep: Reputation: 0
jdk-5 error while building android source code

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


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

build/core/ * 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

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.
Old 03-16-2011, 01:03 PM   #2
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,842

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
Your version is: /bin/bash: java: command not found. The correct version is: 1.5
What shows up in answer to 'which java'? Also be aware java binaries can be 32/64 bit sensitive. My 64 bit laptop needs a 32 bit version of java for OO.
Old 03-16-2011, 01:11 PM   #3
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

The warning is misleading:
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.
The problem is that the script isn't finding *any* version of Java.

JDK 1.6 works as well as JDK 1.5. Sun Java should work as well as Open Java (although, personally, I'd recommend Sun Java). Gnu Java (the default on many distros) will *not* work for Android.

The solution is to modify your $PATH variable so that the commands "java" and "javac" work from the command line.

Once that's taken care of, your build should work.

'Hope that helps .. PSM


android, jdk, kernel, linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Building from source on Android - Where to start? Jinouchi Linux - Software 1 12-01-2010 10:18 AM
I got some problems when i compiling the android source code hmczj Programming 2 05-04-2010 01:05 AM
LXer: Android 2.0 source code now available LXer Syndicated Linux News 0 11-16-2009 11:41 PM
LXer: Google Releases Android Source Code LXer Syndicated Linux News 0 10-21-2008 09:00 PM
Source-code error in Tripwire when building Ephracis Linux - Software 2 02-24-2005 12:02 PM > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 11:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration