Posted on July 3rd, 2010 at 9:48 AM by Jeff

I like to learn about different development languages. When I have an idea for something cool or useful, I do the research and try to do it on my own. Not every language is suited to the task I think of, as a result I have developed a varying level of fluency in multiple languages.

Learning the language is fun, but I am not a fan of having to learn a different IDE for each one. Quite a while ago, I started using Eclipse for my web and scripting projects. It has all of the capabilities I need, project management, syntax highlighting, test and debugging, publishing and much more. There are times when Eclipse cannot be the IDE of choice (*cough* Visual Studio), but for the most part it’s my first stop.

I recently installed Windows 7 64-bit on my computer and as a result needed to reinstall all of my software. When I originally had Vista on this computer, Eclipse did not have a 64-bit version released. So the install was pretty straight forward. Download Java Runtime Environment (JRE) and Eclipse, it all worked nicely. Now, the interesting thing about this is that on both 64-bit versions of Vista and Windows 7 the default Internet Explorer is the 32bit version. When you download Java, it uses your browser to detect the version to install and, as a result, installs 32-bit JRE.

After downloading Eclipse 64-bit, I unzipped it and double clicked the application. I then received the following message:

A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:

C:\Program Files\Java\jre6\bin
javaw.exe in your current PATH

I tracked down javaw.exe in a different folder, C:\Program Files (x86)\Java\jre6\bin, and added that folder to my path and classpath environment variables.  Running Eclipse again presented an error about a javavm.dll.  So, my favorite programming tool is being difficult… Interesting.

Now, before any Eclipse users decide to flame me about changing my path statements, I know it’s not the right way to do it.  Eclipse has an ini file that is the correct place to make this change.  Setting the -vm arguement in eclipse.ini can allow you to quickly change the Java version you are working with.  There are a few rules around the format of eclipse.ini as well as the plaement of the -vm arguement.

Format Rules

Each option and each argument to an option must be on its own line.
All lines after -vmargs are passed as arguments to the JVM, so all arguments and options for eclipse must be specified before -vmargs (just like when you use arguments on the command-line)

Placement Rules

The -vm option and its value (the path) must be on separate lines.
The value must be the full absolute path to the Java executable, not just to the Java home directory.
The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.

As a personal rule, before I edit any file, I make a copy of it and add the date to the name.  This way I can recover if I mess things up completely.

When you are ready, locate your eclipse.ini.  It should be in the same folder you unzipped Eclipse into.  Open it using Notepad and add the following lines above the -vmargs line.

-vm
C:\Program Files (x86)\Java\jre6\bin\javaw.exe

Note that your path to javaw.exe might be different, and that the path does not have quotes in it.

Save the file and launch Eclipse.

Nothing happened.  Eclipse did not open.

Here’s why:  You have Eclipse 64bit and the Java installed was 32bit.  (remember the default browser is IE 32bit).

The fix for this is pretty simple.  In your All Programs menu, you have an option for Internet Exporer (64-bit).  You need to run it and got to http://www.java.com and download the 64bit Java.  The page will have 64-bit listed in several places.

Once you go through the install, you should have a new Java folder in your C:\Program Files. This is the 64-bit version of Java.

Now we need to go back to the eclipse.ini and point the -vm to the correct javaw.exe.

Once again, open the file in Notepad and change the -vm option so that it reflects your 64-bit javaw.exe location.

-vm
C:\Program Files\Java\jre6\bin\javaw.exe

Save the file and open Eclipse.

If everything worked correctly, you should now see the splash screen and the prompt to configure your workspace.  If not, check the path to your javaw.exe and the format of your eclipse.ini.

References
Java Install Website:  http://www.java.com
Java Version FAQ:  http://www.java.com/en/download/faq/java_win64bit.xml
Eclipsepedia (eclipse.ini):  http://wiki.eclipse.org/Eclipse.ini
Eclipse Download:  http://www.eclipse.org/downloads/

23 Responses to “ Installing Eclipse 64-bit on Windows 7 64-bit ”

  • abhishek says:

    Sir,
    i followed the above mentioned steps.. still i am not able to run eclipse on my Win7.. do i need to change the path variable ?? also there is no classpath variable under system variables..should i create it ??

  • Todd says:

    Thanks for the placement of the -vm arg. I changed my value, but had the -vm after -vmargs so its wasn’t being picked up.

  • Bill says:

    Thanks for the tip. I’m working with Win 32-bit, and was going nuts trying to get the -vm statement to point to the file. I put it on a separate line after the -vm line as you suggested and it worked.

  • vighnesh says:

    I copied the jre to the eclipse folder like you did, and got the same problem with the javavm.ddl not being found (although in my case it was called jvm.ddl, i don’t know if that’s something different altogether). However, when I took a look at the eclipse.ini file, it looked completely different from what I’ve seen. Everything was all on one line for a start. Why would that be? This is a 64 bit eclipse, which I made sure to install on the slight chance that maybe it wasn’t.

    • Jeff says:

      You need to check the program you are using to edit the file. I think Notpad will put it all on one line. I used wordpad and it worked fine, just make sure you save the file. (and back it up first!)

  • Ben Keen says:

    Brilliant, thanks! This was a big help – worked like a charm.

  • Thomas Hauck says:

    Thank you very much for this page.
    I was able to launch the 64 bit version of eclipse on 64 bit windows running the 64 bit Java Virtual Machine.

  • Mat Landers says:

    Thanks! I downloaded the 64-bit Java using internet Explorer 64-bit and that fixed my issue! I appreciate your post!

    Mat

  • shayla says:

    Thank you very much, you saved me hours of headache. This is my first eclipse install and I was pretty confused as to why it wouldn’t read my Java installation. Your solution worked perfect!

  • Brian Carlson says:

    This article made eclispe run perfectly in windows 7 home premium. Thanks again!

  • Rune Sætre says:

    Thanks for saving my Windows7 64-bit day!!!

  • Anitha says:

    I am trying to follow the same steps
    i am getting access denied when i want to save
    what dod i do

  • jagadesh.n says:

    thanks a lot it’s workings……………..

  • Bob says:

    I downloaded the 64-bit Java using Internet Explorer 64-bit and Eclipse worked without messing with the .ini at all. Thanks for the help!

  • Joshua Clark says:

    I followed your directions but added the following to the beginning of the .ini file and got it working.

    I also installed the x64 bit version of eclipse SDK.

    -vm
    C:\glassfishv3\jdk\bin\javaw.exe

    http://joshua-clark.blogspot.com

  • syammanu says:

    It worked for me. Appreciate your help.

  • roman says:

    Followed your tutorial.Everything worked great from the beginning.

  • John says:

    Thank you for posting this, this helped me get Eclipse 64 bit installed. The Java site has a link on the download page for 64-bit users, it takes you to a page where you can download the 64-bit version of Java.

  • James says:

    THANK YOU!!! I’ve been beating myself senseless with frustration over the past 2 days. That did the trick!!!

  • max says:

    ok i got the right java the right eclipse but when i open it i get the following message:
    \
    Failed to load the JNI shared library “C:\Program files(86x)\java\JDK1.6.0_26\bin\..\jre\bin\client\jvm.dll

    please help me

    (i`m not such of a computer “expert”)

  • Jordan says:

    You really don’t know how much this helped me. I’ve been trying to figure out how to install Eclipse since I keep getting these errors! This was an awesome tutorial, thank you so much!

Leave a Reply