How to reconfigure eclipse to use a 64 bit JVM - java

I'm using eclipse on what I thought were all 64 bit runtime environments. The current settings Java>installed JREs and Execution Environment all point to jdk1.6.0_30 which is a 64 bit version of the JDK. However, eclipse still thinks it's running a 32 bit version because when I run:
System.getProperty("sun.arch.data.model");
it returns 32 instead of 64.
And the external JNI resource that I compiled for 64 bit machines will not link to the shared .so file unless it's running in a 64 bit enviroment. (I'm getting word size mismatch errors when I try to do this)
So How can I reconfigure eclipse to run 64 bit jvm. Does eclipse itself have to be a 64 bit version?
:on linux
Edit: I have tried everyone's suggestions and nothing is working. I've changed the execution, and enviroment variables to point to the newst JDK I have which is 1.6_30. when I run the program from a command line I get 64 and amd64 as the value when I run the same program in eclise I get 32 and i386. Something is wrong in eclipse that is causing it to try and run it on a 32 bit JVM. when I try java -d32 -version it says that a 32 bit enviroment isn't installed but Eclipse doesn't know that. I've modified the Eclipse.ini file and still nothing is working. I've restarted eclipse after these changes...nothing. Can some one who knows eclipse well people help me out here. thanks

Add the -vm tag to eclipse.ini or the shortcut to explicitly specify a JRE. Note that the default for Windows XP is to use the CRAPPY JRE that comes with Windows.
-vm "%JAVA_HOME%/bin/javaw.exe"

In eclipse.ini add:
-Xmx8g
-d64

For me its working properly! . Make sure your path is c:\Program File not c:\Program File(X86) ( if you installed 64 bit JDK it should store in c:\ Program Files)

Eclipse configuration is explained here

The "installed JREs" (better use JDKs) are used for building and running your code and can be of different architecture or Java version. The JVM used for running Eclipse is defined in the eclipse.ini file. You should use the version for the architecture of the JVM.

Okay. This has been rather headache inducing, but I believe I have a solution. After changing the eclipse.ini, Go to your project properties. Under the Run/Debug settings, edit the launch configuration for your project. Under the JRE tag, click installed JREs. When that dialog comes up, click search. Go to your program files folder, NOT the x86 one, and let it search for your JREs. When the latest comes up, deselect the JRE that was currently selected and select the most recent JRE that it found. I renamed mine JRE7-64 just so I could identify a difference. This solved the issue on my end. Good luck

I think there is a bug in the Run Configuration page.
I had to add the 64-bit JRE in run configuration, select it, and DELETE the 32-bit entry (even though it was already deselected).
eclipse.ini didn't work for me.
This is Eclipse Luna.

Related

how to fix EXE4J_JAVA_HOME, No JVM could be found on your system error?

I installed java 64bit 1.7 and exe4j 64bit version. I tried to generate an exe from exe4j, but while running the program I'm having this error.
This is how I set up path variable. And this is right jre path. What did I miss here? please let me know.
Thank you.
This has to be done during your exe4j configuration.
In the fourth step of Exe4j wizard which is Executable Info select> Advanced options select 32-bit or 64-bit. This worked well for me.
or else install both JDK tool-kits x64 and x32 in your machine.
Try installing the 32 bit version of Java 6. This works for version Install4J 4.0.5. Should fire right up, or allow you to re-run the installer.
Any newer version or the 64-bit version of 6 will fail, complaining that the java.exe is damaged.
There are few steps to overcome this problem:
Uninstall Java related softwares
Uninstall NodeJS if installed
Download java 8 update161
Install it
The problem solved: The problem raised to me at the uninstallation on openfire server.
In my case (OWASP Zap scanner) I had to install the latest OpenJDK from https://adoptium.net
BH's answer of installing Java 6u45 was very close... still got the popup on reboot...BUT after uninstalling Java 6u45, rebooted, no warning! Thank you BH!
Then installed the latest version, 8u151-i586, rebooted no warning.
I added lines in PATH as above, didn't do anything.
My system: Windows 7, 64 bit. Warning was for No JVM, 32 bit Java not found.
Yes, I could have installed the 64 bit version, but 32bit is more compatible with all programs.
It might be issue with the Java JDK/JRE package itself, try downloading & installing/configuring latest version of JDK, followed by system restart. It worked for me and it may work for you too.
I had a similar problem. With the difference that I wanted to use the 32-bit version. The only way I could solve the problem was to install the 32-bit version of Windows XP on a virtual machine!!
Leave you stuff there and Try the following as well:
Start > Right-click on My computer > Properties > Advanced system settings > Environment Variables > look for variable name called "Path" in the lower box
set path value value as: (you can just add it to the starting of line, don't forgot semi column in between )
c:\Program Files\java\jre7\bin
It worked for me, but the exe4j can leave a signature when you double click the .exe application

Failed to load jvm.dll (Eclipse) [duplicate]

When I try opening Eclipse, a pop-up dialog states:
Failed to load the JNI shared library "C:/JDK/bin/client/jvm.dll"`.
Following this, Eclipse force closes.
Here's a few points I'd like to make:
I checked to see if anything exists at that path. It does exist.
My Eclipse and Java SE Development Kit are both 64-bit. I checked my system, and it can handle 64-bit.
I've searched for this problem on Google and on Stack Overflow, and the only answer I found was to download the 32-bit versions of JDK and Eclipse.
Downloading the 32-bit versions is something I only want to do as a very last resort.
What would be suggested to solve this issue?
You need a 64-bit trio:
64-bit OS
64-bit Java
64-bit Eclipse
Working pairings of OS, JDK and Eclipse:
32-bit OS | 32-bit JDK | 32-bit Eclipse (32-bit only)
64-bit OS | 32-bit JDK | 32-bit Eclipse
64-bit OS | 64-bit JDK | 64bit Eclipse (64-bit only)
I had several JDKs and JREs installed.
Each of them had their own entry in the PATH variable, all was working more or less.
Judging from the PATH variables, some installations were completely useless, since they were never used. Of course, the "inactive" Javas could be referenced manually from within Eclipse if I needed, but I never did that, so I really did not need them. (At least I thought so at that time...)
I cleaned up the mess, deinstalled all current Java's, installed only JDK + JRE 1.7 64-bit.
One of the Eclipse 'installations' failed afterwards with the Failed to Load the JNI shared Library and a given path relative to the fresh installed JDK where it thought the jvm.dll to be.
The failing Eclipse was the only one of all my IDEs that was still a 32-bit version on my otherwise all-64-bit setup.
Adding VM arguments, like so often mentioned, in the eclipse.ini was no use in my case (because I had only the wrong JDK/JRE to relate to.)
I was also unable to find out how to check if this Eclipse was a 32-bit or 64-bit version (I could not look it up in the Task Manager, since this Eclipse 'installation' would not start up. And since it had been a while since I had set it up, I could not remember its version either.)
In case you use a newer JDK and a older JRE you might be in for trouble, too, but then it is more likely a java.lang.UnsupportedClassVersionError appears, IIRC.
Make sure your eclipse.ini file includes the following lines.
-vm
C:\path\to\64bit\java\bin\javaw.exe
My eclipse.ini for example:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
-vm
C:\Program Files\Java\jdk1.6.0_32\bin\javaw.exe
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
Use OS and Eclipse both 64 bit or both 32 bit keep same and config eclipse.ini.
Your eclipse.ini file can be found in your eclipse folder.
I had same problem
I resolved it by installing 64 bit JVM from
http://www.java.com/en/download/manual.jsp
This error means that the architecture of Eclipse does not match the architecture of the Java runtime, i.e. if one is 32-bit the other must be the same, and not 64-bit.
The most reliable fix is to specify the JVM location in eclipse.ini:
-vm
C:\Program Files (x86)\Java\jdk1.7.0_55\bin\javaw.exe
Important: These two lines must come before -vmargs. Do not use quotes; spaces are allowed.
Another option is:
Create a shortcut to the Eclipse.exe. Open the shortcut and change the target to:
"C:\Program Files\eclipse\eclipse.exe" -vm "c:\Program Files\Java\jdk1.7.0_04\bin\javaw.exe"
For your installation, make sure the locations point to the correct Eclipse installation directory and the correct javaw.exe installation directory.
(The 64/32 bit versions of Eclipse and Java need to be the same, of course.)
I have multiple versions of Java installed, both Sun JDK & JRockit, both 32 bit and 64-bit, etc. and ran into this problem with a fresh install of 64-bit Eclipse for Java EE (JUNO).
What did NOT work:
64-bit trio as suggested by Peter Rader:
I'm using 64-bit Eclipse on 64-bit OS (Windows 7).
I ensured Sun JDK 7 64-bit was the default java version. When I typed "java -version" from command line (cmd.exe), Sun JDK 7 64-bit was returned...
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
This did not resolve the problem for me.
What DID work:
Adding -vm option to eclipse.ini as suggested by Jayesh Kavathiya:
I added the following to eclipse.ini:
-vm
C:/apps/java/jdk7-64bit/bin/javaw.exe
Note:
I did not have to uninstall any of the various versions of JDK or JRE I have on my machine.
For a missing jvm.dll file, we can provide the path of the dll file in eclipse.ini file as
-vm
C:\Progra~1\Java\jdk1.6.0_38\jre\bin\server\jvm.dll
Here it is important to remove any space in the path and the double quotes.
It worked for me when i removed the quotes and space.
I hope it helps someone.
I had a similar problem. It was solved doing the following.
Move Eclipse to Program Files (not to Program Files (x86)).
Remove the path to the 32-bit version of Java from the 'path' environment variable.
I have both versions of Java installed, but Eclipse kept trying to use the 32-bit one.
Sure, you need to have a compatible version of JDK and Eclipse, but you also need to add in the eclipse.ini file the below lines:
-vm
yourdrive\java\bin
Make them the first two lines of your eclipse.ini file.
As many folks already alluded to, this is a 32 vs. 64 bit problem for both Eclipse and Java. You cannot mix up 32 and 64 bit. Since Eclipse doesn't use JAVA_HOME, you'll likely have to alter your PATH prior to launching Eclipse to ensure you are using not only the appropriate version of Java, but also if 32 or 64 bit (or modify the INI file as Jayath noted).
If you are installing Eclipse from a company-share, you should ensure you can tell which Eclipse version you are unzipping, and unzip to the appropriate Program Files directory to help keep track of which is which, then change the PATH (either permanently via (Windows) Control Panel -> System or set PATH=/path/to/32 or 64bit/java/bin;%PATH% (maybe create a batch file if you don't want to set it in your system and/or user environment variables). Remember, 32-bit is in Program files (x86).
If unsure, just launch Eclipse, if you get the error, change your PATH to the other 'bit' version of Java, and then try again. Then move the Eclipse directory to the appropriate Program Files directory.
The answers above me got me tempted so much, that I decided to dry run all the possible combinations with OS, Eclipse and JVM trio. Anyway, whoever is digging down and reading my post, check the following as a hot spot (I am Windows 7 user).
You understand Program Files and Program File (x86) are two different folders... x86 stands for the 32-bit version of programs and the former is the 64-bit version.
If you have multiple versions of Java installed with different bitness and release versions, which is bound to happen with so many open source IDEs, managers, administrative consoles, the best option is to set the VM argument directly in the eclipse.ini file. If you don't, Eclipse will go crazy and try searching itself which is not good.
Alternatively, get the same "bit" version of JRE and Eclipse and then create a new shortcut with the below target (replace the installed JRE and Eclipse location/path):
"C:\studio\eclipse.exe" -vm "C:\Program Files\Java\jre7\bin\server\jvm.dll" eclipse.vm="C:\Program Files\Java\jre7\bin\server\jvm.dll" java.home="C:\Program Files\Java\jre7" java.runtime.version=1.7.0
That should do the trick.
You can solve that problem as many other replicated. You need that Eclipse and the JDK be 32-bits or both on 64-bits. The architecture of the OS doesn't matter while the others remains on the same type of arquitecture.
One of the easy ways to resolve it is to copy the jre folder from installed the JDK into the Eclipse installation folder. Make sure that JDK you copy from is the same architecture as your Eclipse installation.
I had to configure my machine that way, because I run both Eclipse and Appcelerator Titanium Studio on my machine. The Studio needs 32-bit Java, while Eclipse needs 64-bit.
Yes, just make sure your versions of Eclipse and JDK are both 64-bit. Just to make sure everything is correct uninstalled JDK and install it in Program Files and not in Program Files (x86). At least that resolved my problem.
Just check the PATH environment variable. In My Computer - > Properties -> Advanced System settings -> Environment Variables -> (left upper window "User Variables for "some name of PC"" ) just check the PATH variable. If it doesn't exist create it with the following -- > C:\Program Files (x86)\Java\jre7\bin <--
I was faced with the same problem after had updated my Eclipse. I've found that the path asked 64-bit version, but I had the 32-bit in dif path. It was helpful for me. P.S.: I have a 64-bit OS, 32-bit JRE and 32-bit Eclipse. All works fine :)
You should uninstall all old [JREs][1] and then install the newest one... I had the same problem and now I solve it. I've:
Better install Jre 6 32 bit. It really works.
Downloaded 64 bit JVM from site and installed it manually and updated the system path variable. That solved the issue.
Default JVM is installed in my system was in "C:\Program Files
(x86)\Java\jre7"
Manually installed JVM got installed in
"C:\Program Files\Java\jre7" and after updating this pate to system
path variable it worked.
Thank you misterfrb, I realised that Eclipse was giving this error, because I had just installed Oracle 10g Developer suite, and it was looking for the jvm.dll file in the C:\DevSuiteHome_1 folder (I must have opted to install JDK again along with developer suite).
After removing the DevSuiteHome lines from the paths variable and adding the correction location for 64-bit jvm.dll (not sure if this was necessary, didn't try without), Eclipse worked again, and Developer suite still does too.
Simple, I have a 64-bit OS, 32-bit Eclipse and both JDK 32 & 64 installed... I just uninstalled the 64-bit JDK and Eclipse is working fine..
I had the same issue after upgrading from Java 6 to Java 7. After I removed Java 6 (64 bit) and reinstalled Java 7 (64 bit), Eclipse worked. :)
It is crucial to add the -vm parameter and its value on 2 lines AT THE BEGINNING of the eclipse.ini
-vm
C:\Program Files\Java\jdk1.7.0_45\bin\javaw.exe
You have change proper version of the JAVA_HOME and PATH in environmental variables.
I want to previde another solution for this error, especially for who want to use 32-bit and 64-bit Eclipse in one system.
Eclipse will startup using the JRE/JDK in jre sub-directory if it exists. (STS or other eclipse based IDE also support this feature...)
The solution is create directory junction using mklink.exe command which exist in windows vista or newer version (junction.exe offer similar function for Windows 2000/XP)
Open the command line windows and exeute following command:
mklink /j "$ECLIPSE-HOME/jre" "$JDK_or_JRE_home"
Of course, if the Eclipse is for 64-bit Windows, the architecture of JDK/JRE must be the same.
Assume:
Eclipse for windows x86_64 is installed in d:\devTool\eclipse
JDK for windows x64 is installed in C:\Program Files\Java\jdk1.8.0
The command for creating the jre folder will be:
mklink /j "d:\devTool\eclipse\jre" "C:\Program Files\Java\jdk1.8.0"
BTW, delete directory junction will NOT delete any file. If you create a wrong link, you can delete it using file explorer or rmdir command.
rmdir "d:\devTool\eclipse\jre"
Make sure you are starting Eclipse with Administrator rights.
If you use whole 64-bit trio and it still doesn't work (I've come to this problem while launching Android Monitor in Intellij Idea), probably wrong jvm.dll is being used opposed to what your java expects. Just follow these steps:
Find the jvm.dll in your JRE directory:
C:\Program Files\Java\jre7\server\bin\jvm.dll
Find the jvm.dll in your JDK directory:
c:\Program Files\Java\jdk1.7.0_xx\jre\bin\server\
Copy the jvm.dll from JRE drectory into your JDK directory and overwrite the jvm.dll in JDK.
Don't forget to make a backup, just in case. No need to install or uninstall anything related to Java.
The same occurred to me. I had 64-bit Eclipse, but my JDK was 32-bit. So I installed the 64-bit version and it's OK right now.
I'm not sure why but I had the jre installed into my c:\windows directory and java.exe and javaw.exe inside my windows\system32 directory.
Obviously these directories were getting priority even AFTER adding the -vm flag to my eclipse.ini file.
Delete them from here fixed the issue for me.
On the download page of Eclipse, it should be written "JRE 32 bits" or "JRE 64 bits" and not "Windows 32 bits" or "Windows 64 bits".
Be sure to use the correct version compatible with your JDE, as answered previously.

Android SDK installation doesn't find JDK

I'm trying to install the Android SDK on my Windows 7 x64 System.
jdk-6u23-windows-x64.exe is installed, but the Android SDK setup refuses to proceed because it doesn't find the JDK installation.
Is this a known issue? And is there a solution?
Press Back when you get the notification and then Next. This time it will find the JDK.
Actual SETUP:
OS: Windows 8.1
JDK file: jdk-8u11-windows-x64.exe
ADT file: installer_r23.0.2-windows.exe
Install the x64 JDK, and try the back-next option first, and then try setting JAVA_HOME like the error message says, but if that doesn't work for you either, then try this:
Do as it says, set JAVA_HOME in your environment variables, but in the path use forward slashes instead of backslashes.
Seriously.
For me it failed when JAVA_HOME was C:\Program Files\Java\jdk1.6.0_31 but worked fine when it was C:/Program Files/Java/jdk1.6.0_31 - drove me nuts!
If this is not enough, also add to the beginning of the Environment Variable Path %JAVA_HOME%;
Updated values in System Environment Variables:
JAVA_HOME=C:/Program Files/Java/jdk1.8.0_11
JRE_HOME=C:/Program Files/Java/jre8
Path=%JAVA_HOME%;C:...
I found the solution and it's beautifully stupid. I found Android SDK cannot detect JDK.
Press the Back button on the SDK error screen that tells you that the EXE couldn't detect the JDK. Then press Next.
Who would have thought that would happen?
It seems like it doesn't work without 32 bit JDK.
Just install it and be happy...
I downloaded the .zip archive instead and ran SDK Manager.exe, and it worked like a charm. You had the same issue with the .exe otherwise.
Warning: As a commenter mentioned, don't try this on a Windows 7! I tested it with Windows XP 64 bit.
As the posted solution does NOT work for all (including me, myself, and I), I want to leave a note for those seeking for another way (without registry hacking, etc.) to solve this on a Windows 64 bit system. Just add PATH (capital letters!!) to your environment Variables and set the value to your JDK-Path.
I added JDK to the existing "Path" which did not work, like it didn't with JAVA_HOME or the "Back"-Solution. Adding it to "PATH" finally did the trick.
I hope this might be helpful for somebody.
All you need are the following two registry entries. It appears as if whoever posted the other registry stuff basically just copied all the keys from HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft into HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft,
which obviously isn't an ideal solution because most of the keys aren't needed.
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Development Kit]
"CurrentVersion"="1.6"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Development Kit\1.6]
"JavaHome"="C:\\Program Files\\Java\\jdk1.6.0_23"
Non of these solutions worked for me. I fixed it by temporarily changing the filename of C:\Windows\System32\java.exe to java_.exe
None of the solutions here worked for the 64-bit version.
Putting the JDK path before the c:\windows\system32\ path in your environment variables solves the problem. Otherwise the 32-bit java.exe is found before the 64-bit JDK version.
After reading a couple of blog posts, it does seem to be even an easier fix by clicking BACK when the installer says couldn't find the JDK, and then simply click NEXT again and magically it finds the JDK. No registry messing around or re-downloading etc..
Adding JAVA_HOME environment variable (under System Variables) did the trick for me.
Clicking "Back" and "Next" buttons didn't work.
Windows 7 Professional x64, JDK 1.7.0_04 (64 bit, I don't have x86 version installed)
I think that installer tries to find JDK in specific (1.6?) version and if it can't find it, checks JAVA_HOME which was not set in my case. I have another computer (the same system but with JDK 1.6 x64) and it worked without JAVA_HOME variable.
You don't have to install 32 bit version of JDK :)
I copied the Java.exe from
C:\Windows\System32
to
C:\Windows\SysWOW64
and it worked.
I'm using 64 bit Windows 8.
Setting the JAVA_HOME environment variable to
C:\Program Files\Java\jdk1.7.0_07
instead of
C:\Program Files\Java\jdk1.7.0_07\bin
fixed it for me.
The guy above who put this: "I experienced this problem too, but none of the answers helped. What I did, I removed the last backslash from the JAVA_HOME variable and it started working. Also, remember not to include the bin folder in the path." This was in fact the correct answer.
For this SDK to install this is what I did. I am running the latest Microsoft OS Windows 8.
User Variables:
Path C:\Program Files\Java\jdk1.7.0_07\bin
Environment Variables
Create these two:
CLASSPATH %HOME_JAVA%\jre\lib
HOME_JAVA C:\Program Files\Java\jdk1.7.0_09
This one already exists so just edit:
Path At this end of WindowsPowerShell\v1.0\ simply add ";C:\Program
Files\Java\jdk1.7.0_09"
This is what I did and it worked for me. =)
This registry fix worked like a charm on my Windows 7 x64 setup: http://codearetoy.wordpress.com/2010/12/23/jdk-not-found-on-installing-android-sdk/
Press Report error and OK. Next will be enabled.
Try downloading and installing the zipped version rather than the .exe installer.
Also, RUN AS ADMINISTRATOR! Worked for me with backslash fix.
I had the same problem, tried all the solutions but nothing worked. The problem is with Windows 7 installed is 64 bit and all the software that you are installing should be 32 bit. Android SDK itself is 32 bit and it identifies only 32 bit JDK. So install following software.
JDK (32 bit)
Android SDK (while installing SDK, make sure install it in directory other than "C:\Program Files (x86)", more probably in other drive or in the directory where Eclipse is extracted)
Eclipse (32 bit) and finally ADT.
I tried it and all works fine.
I had the same problem and solved it by installing the x86 version of the JDK (on Windows XP x64).
I experienced this problem too, but none of the answers helped. What I did, I removed the last backslash from the JAVA_HOME variable and it started working. Also, remember not to include the bin folder in the path.
Android SDK is 32 bit app, and it requires the 32 bit of JDK to work... the 64 bit JDK won't make any use for it...
1-Simply done the "JAVA_HOME" environment variable thing.
2-Right-Click on Android SDK and from compatibletiy Tab Select windows 7 and administrator.
3-Run it again.
WORKING SOLUTION AND NO REGISTRY MODIFY NEEDED
Simply put your java bin path in front of your PATH environment.
PATH before
C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)
PATH after
C:\Program Files\Java\jdk1.6.0_18\bin;C:\Windows\system32;C:\Windows\%^^&^&^............(old path setting)
And now the Android SDK installer is working.
BTW, I'm running Win7 x64.
For installer_r21.1-windows.exe on Windows 8 x 64 what worked for me was setting up my user environment variable JAVA_HOME to C:\Program Files\Java\jdk1.7.0_10.
Hope this helps you all! :)
Yeah install the 32 bit version of the Java SE SDK (or any of the combinations). That should help solve your problem.
I'm running a 64-bit version of Windows 7 and I was getting this issue when attempting to install Android Studio 1.0 using the executable from:
http://developer.android.com/tools/studio/index.html
I tried all the listed solutions and several different versions of JDK 1.7 and 1.8 -- no dice. I went with installing the zipped version of the application and it worked like a charm:
http://tools.android.com/download/studio/canary/latest
Still baffled by this problem; especially since beta versions of Android Studio worked just fine.
The above methods did not work for me in Windows 8 Pro.
Just set the path to
C:\Program Files\Java\jdk1.7.0_07\
Where C is your drive in which you have installed the JDK.
Don't forget the backward slash at the end.
You will have to download the 32-bit SDK version because Win7 64-bit is not supported only Windows Server 2003 has a supported 64-bit version. During the download of Java SDK pick "Windows" as your platform and not "Windowsx64".
Once I did this android SDK installed like a charm. Hope this helps.
I tried several posted solutions and then it took a system reboot before it started working, which may have been because I had just installed the JDK. Here are all the things I had going on - not sure which ones were essential:
64-bit JDK installed.
JAVA_HOME defined using forward slashes (/) instead of backslashes
().
JDK 'bin' directory listed at beginning of PATH.
System reboot.

Running 32bit eclipse with 32bit jvm on windows 64bit

One of the .jar files I am using only works with the 32-bit java virtual machine on windows. I installed the 32bit versions of eclipse and the jdk but it is still getting the same error. What commands would I use in the run configuration to specify 32-bit virtual machine for running the application that uses this .jar file?
-vm
C:\Program Files (x86)\Java\jre6\bin\javaw.exe
doesn't work. Any ideas?
There are TWO JVM's in action when developing with Eclipse. One running Eclipse itself, and the other one used for your program.
Unless you are talking about a plugin, it is the latter you need to worry about. Remove the -vm option so Eclipse starts with the default JRE. Then go to Preferences -> Java -> Installed JRE's and add your 32 bit Java installation and set it to be default (this is the trick).
If the JVM used by your applications change, you are done.
If not, you should start with a new workspace, add the 32-bit JVM and create your projects as before.
Take a look at this page:
http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F
If you specify your VM within the eclipe.ini it have to be in a special line (I think).
Did you change you installed VMs?
Window -> Preferences -> Java -> Installed JREs
There can be the 64bit VM.
With the -vm parameter you specify the JRE to start Eclipse. With the installed VMs you specify the VM to run you code.
The are a lot of version of the virtual machine so let's go by all of them:
JRE 32 bit, JRE 64 bit, JDK 32 bit, JDK 64 bit.
If you have a 64 bit OS, you should be able to all of them and that's what I have installed in my machine, but there's an order you have to follow, the order I just described, first JRE 32 bit, then JRE 64, JDK32, JDK64. Other orders of installation may cause problems. Just in case, I'd recommend you to remove every virtual machine you have installed (JavaRa makes it easier: http://singularlabs.com/software/javara/javara-download/ ) and then proceed to the installation in the order described.
There are some reasons you wanna run a 32 bit Eclipse even if you have a 64 bit OS and one of them is that there are some suites and tools that do not support the 64 bit version.
Don't forget to set:
JAVA_HOME: .;JDK32 PATH\bin;JDK64 PATH\bin
PATH: .;JDK32 PATH\bin;JDK64 PATH\bin
It's always good to put the .; first in the value of your new environment variables
The JVM you are using to run your project in eclipse is defined at your project's "run configuration", click right on your project then choose "Run as" then "Run configurations...". In the window that opens, make sure that your main class (the one you use to start the program) is selected in the menu on the left side, choose the Tab "JRE" and choose the according JRE (in your case, the 32 bit version). Close the window by clicking "run" to see if it worked.

Run eclipse on windows 7 64 bit

I'm trying to run eclipse for java in Windows 7 64bit edition, and when I run the eclipse.exe file, absolutely nothing happens. A ephimeral javaw.exe process is created in the task manager, but as I said, it's just there for a split second, and it disappears, after that NOTHING. I tried compiling a small program with the javac.exe file, and that works all right, but for some reason I cannot run Eclipse.
Any suggestions on what I could be doing wrong. I'm a complete Java noob, it's the first time I try to do this.
These are the files I have, and I downloaded the Windows 64bit version of eclipse.
Thanks!
EDIT
OK, solved. The book I'm using is misleading... it said I should use the javaw.exe file from jdk1.6.0_21, and doing that didn't work. Now I tried with one in jre6, and it ran.
Thanks everyone and sorry for the hassle!
First, check you eclipse.ini (even a space at the end of a line can prevent eclipse from starting)
Second I am surprised to see java* file in your Eclipse distribution.
You shouldn't' have those, and instead refer to the right java (64 bits) in your eclipse.ini.
In both case, see this eclipse.ini as a good example.
Check also the <workspace>/.metadata/.log (error log file).
I just added it there because it was asking for it, supposedly the best way it to put it in the PATH.
If eclipse is "asking for it", that means your current java installation is not part of the PATH. It need to be reference from the eclipse.ini file.
See also FAQ How do I run Eclipse?
In any event, don't copy any java files around.
Used in your eclipse.ini a path like:
-vm
C:/Prog/Java/jdk1.6.0_21/jre/bin/server/jvm.dll
Do you have the 64-bit version of Java? http://www.java.com/en/download/faq/java_win64bit.xml
I experienced relatively little trouble moving to 64-bit java:
Download Eclipse Helios 64-bit version
Download Java 6 SDK 64-bit version
Install both
Run
The issues may arise if you have both 32-bit and 64-bit JDKs in the same machine. If you want to explicitly run Eclipse with one JVM, then you need to specify its full path in eclipse.ini.
e.g.
-vm
C:/Program Files/Java/jdk1.6.0_20/bin/javaw.exe
Where the path points to the 64-bit version.
The other issue I encountered after moving is that the Subclipse plugin by default uses a 32-bit DLL backend and therefore doesn't work. However Subclipse also works with a pure-Java back-end for Eclipse called JavaHL which solved that issue.
I faced similar problem and did not know how to proceed.
I did following things to resolve it.
In eclipse.ini enter the vm argument to which jre you want to use
-vm
C:\Java\jdk1.7\jre\bin\javaw.exe
If you have -Dosgi.requiredJavaVersion=1.7 line in your eclipse
make sure that version is matching the one that is mentione in step 1.
( in my case it was 1.6 and I had to change this value to 1.7)
Launch eclipse.exe from the command line

Categories