3

I recently installed Helios on my windows 7 64 bit laptop and started seeing this error after I tried to run some simple java code:

Exception occurred executing command line. Cannot run program "C:\Program Files\Java\jre6\bin\javaw.exe" (in directory "C:\projects\workspace\Testing"): CreateProcess error=5, Access is denied

I double checked my 32 bit installation on my desktop running WindowsXP and I have it setup the same way. What is odd is that it works for a while after I first install eclipse, then it throws the error after a while and I can't get past it. I did run java -version from the command line, so the java home is setup right.

If I remember right the widows preferences jre should point to this file, but why is the access denied error showing up?

Aftermath: Sorry for all this. Something got messed up in my environment, so I reverted back to a previous stable point and then I reinstalled eclipse which solved the problem.

I did more checking and this is a common problem, but for differing causes. Here are some links that may help:

  1. Tutorial for installing Eclipse with Windows 7
  2. Stack Overflow question about crashes with Eclipse and Win7
  3. Helios 64 bit windows 7 javaw access is denied issue
  4. Windows 7 Access is denied permission ownership issue
Community
  • 1
  • 1
James Drinkard
  • 15,342
  • 16
  • 114
  • 137

3 Answers3

2

See this thread and define explicitly the vm path in your eclipse.ini (like in this one).

-vm
C:/Prog/Java/jdk1.6.0_21/jre/bin/server/jvm.dll

(adapt the path and the Java version number).

This should solve the issue.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I reinstalled jdk 1.6, 764 bit as administrator. I think I did that the first time when everything worked. If I remember right things started hosing up when I added GWT to eclipse, but I was upgrading the jdk to a later version, so I may be mistaken. I changed the eclipse.ini as well, but it's still showing the same error. I've been working with eclipse for years and I've never seen this problem before. Anything else I could try???? – James Drinkard Feb 25 '11 at 01:20
  • @james: try adding the vm parameter as indicated in the answer to a fresh eclipse installation, then try to add GWT, and see if you reproduce the issue. – VonC Feb 25 '11 at 05:03
0

There are lots of security restrictions in Windows7. One of them is, it does not allow applications to write data in system directories. The easiest solution I find is to move Eclipse and workspace to a drive other C:\ drive. But that may not fit for everyone.

You may want to look into this: Eclipse and Windows 7

Community
  • 1
  • 1
Nishant
  • 54,584
  • 13
  • 112
  • 127
0

I have added the following lines in my eclipse.ini file:

-vm C:/Program Files/Java/jdk1.8.0_241/jre/bin/javaw.exe

And restarted eclipse. This resolved my issue. Make sure to add these lines before "-vmargs" argument in eclipse.ini file. Also make sure to edit the path for javaw.exe as per your local set up.