Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Bazz44
Old
(Last edited by Bazz44; 21st August 2010 at 09:36 PM.) Reason: Adding information
#1  
Bazz44's Avatar
Junior Member - OP
Thanks Meter 0
Posts: 7
Join Date: Aug 2010
Location: Etobicoke
Exclamation Android SDK Setup - Java is not found in your PATH.

Hi,

I am new to Android. I have downloaded and installed every necessary component in order to start working with Android. The issue I am having is that in Command Prompt, anything I type in related to the Android SDK (for example: adb, or even just android) comes back with "Java was not found in your path". Now, I have changed all my PATH variables under "User" to the EXACT locations of where these folders are, but no dice. It keeps telling me to go and edit my PATH variables. Even running SDK Setup, gives me the same error, and tells me to add where Java was found (even though I have!).

I am starting to get really fed up with this, because Eclipse can't find the "jre" folder inside the Java JDK, either (that is, of course, until I copy the entire jre folder inside of the eclipse folder, or put eclipse inside of the JDK folder)...

I just know it shouldn't have to be this tedious to set everything up and I would really appreciate it if someone can help with this

I am running Java JDK 1.6.0_21 (x64), Eclipse Helios (3.6) IDE for Java EE Dev., Android SDK Revision 6, all on Windows 7 Ultimate x64.

Something to note: I have not encountered any problems with Eclipse Helios and the ADT plugin as stated on the Android Developers website. I can use Eclipse and the SDK to create and run the"Hello, Android!" application on the emulators without issues. I just want to be able to run everything from the command prompt, too. Now, if I can only get my phone to be recognized after I get this resolved.

I also need this for rooting and unlocking the phone.
 
Skye Menjou
Old
#2  
Skye Menjou's Avatar
Senior Member
Thanks Meter 21
Posts: 325
Join Date: Jul 2009
Location: Halen
Quote:
Originally Posted by Bazz44 View Post
Hi,



I just know it shouldn't have to be this tedious to set everything up and I would really appreciate it if someone can help with this

I am running Java JDK 1.6.0_21 (x64), Eclipse Helios (3.6) IDE for Java EE Dev., Android SDK Revision 6, all on Windows 7 Ultimate x64.
In the SDK tools folder go to libs and edit find_java.bat.
Change all instances of %PROGRAMFILES% to %PROGRAMFILES(X86)% .
I had to do this for my SDK.
Your java will probably still resides in c:\program files (x86)\java or the likes.

To test if it works open DDMS.bat(May need to open twice).
Quote:
"Love is wise — Hatred is foolish." In this world, which is getting more and more closely interconnected, we have to learn to tolerate each other. We have to learn to put up with the fact, that some people say things we don't like. We can only live together in that way. But if we are to live together, and not die together, we must learn a kind of charity and a kind of tolerance which is absolutely vital, to the continuation of human life on this planet. - Bertrand Russel
The Following User Says Thank You to Skye Menjou For This Useful Post: [ Click to Expand ]
 
Bazz44
Old
#3  
Bazz44's Avatar
Junior Member - OP
Thanks Meter 0
Posts: 7
Join Date: Aug 2010
Location: Etobicoke
I ran "ddms.bat" before changing the "find_java.bat", and it just came up that it could not find the path > checking if it is installed elsewhere. I did what you suggested (I found three instances of where I needed to add the (x86)), ran "ddms.bat", and got the same error. However, this time it also opened the Dalvik Debug Monitor. Eclipse still won't run without its own copy of the "jre" folder from the JDK at the same folder level as the "eclipse.exe"...
 
bushu
Old
#4  
Junior Member
Thanks Meter 0
Posts: 11
Join Date: Aug 2010
Location: Yorkshire
any luck with this? I'm also having same trouble in Win7x64
Gonna give in otherwise n reboot my ubuntu system see if thats any easier
i know i can't use OpenJDK or something so ill have to swap that but fingers crossed
=]
 
rubensbasket
Old
#5  
Member
Thanks Meter 0
Posts: 58
Join Date: Jan 2009
Default Solution

Install any JRE Java, Copy the java folder at program files/Java/jre6 Paste it inside MOTODEV´s folder program files/Motorola/MOTODEV Studio for Android 1.2/ and rename it to jre

Done
 
bushu
Old
#6  
Junior Member
Thanks Meter 0
Posts: 11
Join Date: Aug 2010
Location: Yorkshire
Edited the eclipse .ini works a treat now wi java x64...
time to whip out the olde java books from college an see if any of it comes back to me

Is it possible to install the android sdk platforms & extras offline manually, my only net atm is my desire tethered, unlimited data but I don't wanna push my luck
HTC Desire for gym & faffing but, current Galaxy Nexus fan with my Nexus 7 on order too
 
rcdeck
Old
#7  
Senior Member
Thanks Meter 6
Posts: 188
Join Date: Aug 2010
Location: Charlotte, NC
I'm not sure if it may be related or not but according to the android dev page, you should be using eclipse 3.5 because they have been having problems with 3.6

May or may not be related but worth a shot.
 
rcdeck
Old
#8  
Senior Member
Thanks Meter 6
Posts: 188
Join Date: Aug 2010
Location: Charlotte, NC
I'm not sure if it may be related or not but according to the android dev page, you should be using eclipse 3.5 because they have been having problems with 3.6

May or may not be related but worth a shot.
 
swap.blue
Old
#9  
Junior Member
Thanks Meter 0
Posts: 26
Join Date: Jan 2012
Location: New Delhi
i need help http://forum.xda-developers.com/show...2#post24028502
 
lufc
Old
#10  
lufc's Avatar
Senior Moderator / Resident Priest
Thanks Meter 1472
Posts: 9,442
Join Date: Oct 2007
Location: Blackpool UK

 
DONATE TO ME
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting

Moving to Q&A
Pay attention and participate,Encourage,
not discourage, Listen to advice and accept instruction,
and in the end you will be wise.......... Prov. 19:20

 
Post Reply+
Tags
android, java, jdk, path, sdk
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Guide to Using Adobe Air on Android

When writing an app with performance in mind, you most likely want to write it native code using the … more

Boot Animation Paradise for your Android Device

The default boot animations on any device, no matter whichmanufacturer, are generally pretty … more