Android Studio will not install in Win 7 -- $(^Name) has stopped working

Experts, I really need your help.

I've searched over the internet and found that the android-studio-bundle shows this error when it cannot locate the path to a valid JDK.

I have installed and re-installed jdk1.7.0_40 in both x64 and i586 versions.

I have tried setting environmental variables: JAVA_HOME, ANDROID_SDK, JDK_HOME to a host of various path settings: C:\Program Files\Java\jdk1.7.0_40 or ...\bin -- no joy.

I have renamed System32's "java.exe" to java_old.exe.  

Still no install.

I'm repeating the same solutions expecting a different result, the definition of madness.

Can you suggest something else?

Capt
Glen GibbOwnerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
From a command prompt what does the following give (or an explorer window)
%JDK_HOME%

just to be sure it is returning the correct path
0
Glen GibbOwnerAuthor Commented:
Looks like you're on to something!

The response is, "'C:\Program' is not recognized as an internal or external command, operable program or batch file."

So what do I need to do for the path: C:\Program Files\Java\jdk1.7.0_40 ?  Obviously the path is getting chopped at the wrist.  

Should that be C:\Progra~1\... or something?

Capt
0
GaryCommented:
When you put the path in enclose it in " " (in the Environment dialog that is)
That's why its getting cut off because the space is seen as the end of the variable.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

CompProbSolvCommented:
Following with the same idea, try the following
dir "JAVA_HOME"
0
Glen GibbOwnerAuthor Commented:
So I have revised using quotes, but now the message reads: "C:\Program Files\Java\jdk1.7.0_40\bin" is not recognized ....

Should I drop the \bin ?
0
GaryCommented:
Click Start, Run and enter %JDK_HOME% in the dialog, if the folder opens you're good to go else double check the path
0
CompProbSolvCommented:
You should drop the \bin from the variable.
0
Glen GibbOwnerAuthor Commented:
Still getting the same sort of message.  Of course the path name is NOT the exe file.  Does a java.exe have to be included?
0
GaryCommented:
Did you remove the \bin from the path name as CompProbSolv said.
0
GaryCommented:
Did you set the path for JAVA_HOME as well? Since we were only talking about JDK_HOME
0
Glen GibbOwnerAuthor Commented:
Yes.  

JAVA_HOME is set to:  "C:\Program Files\Java\jdk1.7.0_40\bin\";"C:\Program Files (x86)\Java\jdk1.7.0_40\bin\".

JDK_HOME is: "C:\Program Files\Java\jdk1.7.0_40\";"C:\Program Files (x86)\Java\jdk1.7.0_40\";

From the command line, both %JDK_HOME% and %JAVA_HOME% throw the "not recognized" error.

The Android installer still throws the same $(^Name) error.
0
GaryCommented:
JAVA_HOME is set to:  "C:\Program Files\Java\jdk1.7.0_40\bin\";"C:\Program Files (x86)\Java\jdk1.7.0_40\bin\".

JAVA_HOME should be "C:\Program Files\Java\jdk1.7.0_40"
(no bin)

They throw the error because its trying to load a file, if you run it from the RUN dialog then it should open the folder.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Glen GibbOwnerAuthor Commented:
Made the modification as suggested.  Run opens the "C:\Program Files\Java\jdk1.7.0_40" folder.

android-studio is still flummoxed.

For simplicity's sake, I reduced the environmental variable to the x64 version.  Does AS need the (x86) path?
0
Glen GibbOwnerAuthor Commented:
Thanks for the help, Experts.  Still cannot get Android Studio to install, but I appreciate your comments.
0
GaryCommented:
np - still do not understand why if the paths are correct.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Android

From novice to tech pro — start learning today.