Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
225 views
in Technique[技术] by (71.8m points)

java - tools.jar seems to be not in Android Studio classpath on Windows 8

I installed Android Studio but it was giving me error that I need to install JDK but JDK was already installed. Then I realized it is asking to install 64bit version of JDK.

Anyway I just downloaded latest JDK 64bit version and set the following in Environment Variable but still Android Studio is giving error:

Error

'tools.jar' seems to be not in Android Studio classpath.  
Please ensure JAVA_HOME points to JDK rather than JRE.

Following paths are set in my Windows 8.

Path in User Variables  
E:Program FilesJavajdk1.8.0_25in

JAVA_HOME in System Variables  
E:Program FilesJavajdk1.8.0_25

Path in System Variables  
E:Program FilesJavajdk1.8.0_25in

32bit JDK is installed on C drive while 64bit JDK is installed on E drive (as shown above). 32 bit JDK is not being used in any User or System Variables.

I have also restarted the PC.

How do I fix this issue?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I had this same problem and was able to fix it after wasting about 3 hours:

Just copy tools.jar from %JAVA_HOME%lib to (Android Studio Root)lib


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...