3

I just downloaded eclipse-java-helios-SR2-win32-x86_64.zip extracted the zip. When i'm trying to run i get error:

Click to see the error

Here is my .ini file:

-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
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx384m

I'm runing on Windows 7 64bit (Yes i downloaded the 64bit JDK and 64bit Eclipse)

Danpe
  • 18,668
  • 21
  • 96
  • 131

6 Answers6

4

The JVM being used by Eclipse for startup is somehow C:\Windows\system32\javaw.exe. I do not think that this what you intended to use.

To specify the JVM to be used by Eclipse, add the following line to the eclipse.ini file:

-vm <location of javaw.exe of your JAVA_HOME>

The above line would ideally have to be present before the line where your vmargs are specified.

Vineet Reynolds
  • 76,006
  • 17
  • 150
  • 174
  • When i add it to the shortcut arguments it works, but where should i add it in the INI file? – Danpe Jun 13 '11 at 17:36
  • Just above `-vmargs`, like I stated in the answer. – Vineet Reynolds Jun 13 '11 at 17:39
  • still same error here is my new INI file: http://pastebin.com/QKcy4Kbm And it works as a Shortcut though, but i want original one to work too. – Danpe Jun 13 '11 at 17:42
  • 2
    Three possibilities might work: Specify the vm as :`-vm C:/Program Files/Java/jdk1.6.0_26/jre/bin/javaw.exe`, or use the VM from the JDK itself: `-vm C:/Program Files/Java/jdk1.6.0_26/bin/javaw.exe`, or move the -vm flag to the first line of eclipse.ini. – Vineet Reynolds Jun 13 '11 at 17:46
  • 2
    Also, I don't specify any arguments in a shortcut. I let Eclipse pick up the eclipse.ini file from the eclipse installation directory. At most, I specify `eclipse -clean` occasionally. – Vineet Reynolds Jun 13 '11 at 17:47
  • @Vineet nothing... Maybe i'll just use the shortcut? – Danpe Jun 13 '11 at 17:50
  • I don't give up that easily. Does it still report using javaw.exe from `C:\Windows\system32`? – Vineet Reynolds Jun 13 '11 at 17:55
  • @Danpe, check your PATH environment variable as well. `javaw.exe` from the JDK might not be used because `%SystemRoot%\system32` might be specified before it. – Vineet Reynolds Jun 13 '11 at 17:57
2

I just had this problem after updating from Java 7u17 to Java 7u21. I first tried editing eclipse.ini, but that did't work. I then re-downloaded and re-installed the JRE and then it worked!

I'm guessing the JRE install was somehow corrupted, and so Eclipse tried to use the fallback jvm of C:\Windows\System32\java.exe

Hope this helps others with the same issue.

vewert
  • 31
  • 3
0

Is there any chance that you have Quick Test Professional installed? If so, check this out: https://issuetracker.springsource.com/browse/STS-2828

I was getting the same error, tried several recommendations and none worked. When I try to check my java version, I get something like this:

Picked up JAVA_TOOL_OPTIONS: -agentlib jvmhook Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\ bin\JAVA_S~1\classes;C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar Error occurred during initialization of VM Could not find agent library jvmhook on the library path, with error: Can't find dependent libraries

In my case it was caused by a user environment variable that QTP put in my user profile. Someone asked a similar question over on Software Quality Assurance and Testing. He had success by removing the environment variables. When I removed the environment variables, I got Eclipse to work, but QTP is having some problems.

*Update: The problems I was having with QTP seem to have been because I was trying to log in while the nightly regression tests were running and all the available licenses were being used. I am now able to use either program with no issues.

Community
  • 1
  • 1
John Oglesby
  • 101
  • 5
0

It looks like the application is defaulting to the system32 java application.

You can change it by making sure that your PATH variable in the system environment is set properly to point to the correct version of java(64 bit jdk\bin) version.

Make sure that the shortcuts in C:\Program Data\Oracle\Java point to the correct version of java. If not fix the target location. (if you cannot fix the locations in the shortcut properties, delete the shortcuts and create a new one with the same name)

Note that Program Data is a hidden folder.

Luís Cruz
  • 14,780
  • 16
  • 68
  • 100
Nikx
  • 1
  • 1
0

You are trying to run using a JRE instead of a JDK. Download the latest JDK from Sun (oops I mean oracle):

http://www.oracle.com/technetwork/java/javase/downloads/index.html

And run with that instead.

Andrew Eisenberg
  • 28,387
  • 9
  • 92
  • 148
0

Maybe you can try to set the following arguments smaller.

--launcher.XXMaxPermSize 256M

-Xmx384m

Don't know why, but it works for me .

Dollyn
  • 914
  • 4
  • 15