I'm trying to get Eclipse to compile and run a HelloWorld class but it can't even do that. I have installed Eclipse x86 SDK 4.2.0 together bit with the latest JRE and JDK both in 64 bit as well. I also have the PATH variables set to respond to command prompts. When I try to run the following code:
class HelloWorld {
public static void main(String[] args)
{
System.out.println("Hello World!" ) ;
}
}
And it returns the following error:
Exception occurred executing command line.
Cannot run program "C:\Program Files\Java\jre7\bin\javaw.exe" (in directory "C:\Users\Default\workspace\devs"): CreateProcess error=5, Access is denied.
Can you help me fix this?
Thanks!
Best Answer
You have to add the following entry to your
eclipse.ini
file:Make sure you replace the version number with yours and backup the original eclipse.ini file in case of trouble and copy the lines above into the file BEFORE the --vmargs argument. If not, Eclipse will crash.
Follow this link for more information: http://www.eclipse.org/forums/index.php?t=msg&goto=559997&S=a4836b4add35f1ac144df946cb1ef64d