11

Tried googling but couldn't found the solution.

Using Windows 7 Ultimate 64 bits.

I have java(64 bits) installed here : C:\Program Files (x86)\Java\jre7

Downloaded Android SDK from here Get the Android SDK

I downloaded the 64 bits considering my windows is 64 bits. Was 32 bits required?

Now whenever i run eclipse.exe I get the following error:

A Java Runtime Environment or JDK must be available in order to run Eclipsec. No java virtual machine was found after searching the following location: C:\Users..\Downloads\adt-bundle-windows=x86_64-3013131030\adt-bundle-windows-x86_64-20131030\eclipse\jre\bin\java.exe

Sorry can't post a screenshot because don't have any reputation as of now here.

So what should I do?
Do I need to install 32 bit Java or download 32 bit SDK ?

PS: Before running Eclipse I have run "SDK Manager" and it installed some necessary tools. Maybe if this helps.

KyleMit
  • 30,350
  • 66
  • 462
  • 664
Deepanshu
  • 595
  • 2
  • 5
  • 11
  • 1
    x86 is for 32bit. make sure you direct the eclipse jre/jdk to the matching bit - if eclipse is for 64bit then it should have jre 64. – Ariel Pinchover Dec 04 '13 at 11:34
  • by looking at preferences in eclipse -> java -> jre or something like it – Ariel Pinchover Dec 04 '13 at 11:37
  • Is the java am having is 32 bits? So should i install Java for 64 bits? If so, will 32 bits and 64 bits together work properly? Or do i need to install 32 bits? – Deepanshu Dec 04 '13 at 11:38
  • if you have a 32bit OS then you can only use 32bit versions of eclipse and jre/jdk. if you have 64bit OS then you should have the eclipse bit version match with the jre/jdk bit bit version – Ariel Pinchover Dec 04 '13 at 11:39
  • So am installing Java 64 bits. May be that helps. – Deepanshu Dec 04 '13 at 11:43
  • As you have tagged this question 'android', I'm assuming you want to develop Android apps. In which case the JRE is not sufficient, you will need the JDK. – NickT Dec 04 '13 at 11:50
  • yup i have started learning Android programming. So should i download only JDK 7u 45 or netbeans as well? – Deepanshu Dec 04 '13 at 11:57
  • Netbeans is another IDE. If you've got Eclipse you don't need it. Android doesn't officially support Java 7, only version 6 see http://developer.android.com/sdk/index.html. Some people do use 7 succesfully, I use 6 so can't comment on the pitfalls, if any. – NickT Dec 04 '13 at 12:00
  • atm am using jre7.. so if i download jdk 6 will it work fine or will also have to download jre6? – Deepanshu Dec 04 '13 at 15:46
  • 1
    possible duplicate of [Eclipse - no Java (JRE) / (JDK) ... no virtual machine](http://stackoverflow.com/questions/2030434/eclipse-no-java-jre-jdk-no-virtual-machine) – KyleMit Jun 17 '14 at 23:05

3 Answers3

9

Just Set your environment variable. Goto to Computer properties -> Advance System Setting -> Environment variables -> System Variables -> path and after a semi colon paste the path of your JRE like this C:\Program Files\Java\jre7\bin click on ok.

Open CMD and type java if this command works properly means your path has been set now. just open you eclipse and it will work this time. You can do this through command line too just type set PATH=C:\Program Files\Java\jre1.6.0_03\bin and press enter.

If still it is not working just paste this set PATH=C:\Program Files\Java\jre1.6.0_03\bin in your eclipse.ini file :)

MrDumb
  • 2,140
  • 1
  • 21
  • 31
1

You need to use any of the following configurations:

  1. x64 System, x64 JDK, x64 ADT Bundle
  2. x64 System, x86 JDK, x86 ADT Bundle
  3. x86 System, x86 JDK, and ADT Bundle
KyleMit
  • 30,350
  • 66
  • 462
  • 664
insomniac
  • 11,146
  • 6
  • 44
  • 55
1

You have a 32-bit Java. "Program Files (x86)" is for 32-bit programs on a 64-bit system. Either install a 64-bit Java and use the download you have, or get the 32-bit download.

nitind
  • 19,089
  • 4
  • 34
  • 43