LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, LiMo, Maemo, MeeGo, Openmoko, Ubuntu Mobile, WebOS, Firefox OS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site: AndroidQuestions.org

Notices

Reply
 
Search this Thread
Old 03-16-2011, 10:44 AM   #1
preetb123
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

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

http://linuxclues.blogspot.com/2010/...ebian-sid.html

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
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,187

Rep: Reputation: 530Reputation: 530Reputation: 530Reputation: 530Reputation: 530Reputation: 530
Quote:
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
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

The warning is misleading:
Quote:
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
 
  


Reply

Tags
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


All times are GMT -5. The time now is 02:37 PM.

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