1

I am running Windows 8 Professional and I am trying to run Eclipse as a non-administrator user without success. Eclipse terminates with "JVM Terminated, Error code 2".

Eclipse tries to use %SYSTEM32%\javaw.exe inspite of JAVA_HOME being set to %PROGRAM_FILES%\Java\jdk1.7.0_07.

I have a non-administrator user account and when I type dir c:\windows\system32\java* it results in "File Not Found".

Here is where it gets strange. If I open a command prompt as Administrator and type the same command I get:

Directory of C:\Windows\System32
09/24/2012  10:16 AM           188,904 java.exe
09/24/2012  10:16 AM           189,416 javaw.exe
09/24/2012  10:16 AM           289,768 javaws.exe

I have full read and execute access in %SYSTEM32% as my normal user, but I only see 2414 files in System32 as opposed to 3107 if running as administrator.

What is going on and is there any way to fix this?

5
  • I got Eclipse to run by editing the eclipse.ini file to point to the JDK by using the -vm switch. But I still cannot understand why I cannot access java in System32 as non-admin user. Sep 25, 2012 at 14:27
  • 4
    Are you running a 64-bit system, with Eclipse running as 32-bit? %SYSTEM32% points to C:\Windows\SysWoW64 in such a scenario. (This is used for the Windows-on-Windows abstraction layer that supports the cross-architecture functionality, or at least it did in windows vista/windows XP) Sep 25, 2012 at 14:37
  • @DarthAndroid: That should be an answer!
    – surfasb
    Sep 25, 2012 at 23:52
  • 1
    Deleting java*.exe from \Windows\System32 solved problems with all other apps too. Android SDK installer for instance tried to use \Windows\System32\java* instead of looking at JAVA_HOME or PATH which made it fail. But, the question remains why Windows 8 hides java.exe if it is in \Windows\System32. Sep 26, 2012 at 7:35
  • Ah! I changed the setting "Protect system files" in Explorer, but didn't open a new CMD.EXE. Now the java files appear. Sep 26, 2012 at 7:51

2 Answers 2

1

I had a similar problem and solved it as follows:

  • In Windows 8 » Control Panel » User Account » Turned Off User Access Control.
  • Created a directory called : c:\apps
  • Installed JDK to c:\apps\java; The installed jre to c:\apps\java\jre\
  • Installed Eclipse for Java Developers to c:\apps\eclipse
  • Started eclipse.exe by right clicking and running as Administrator.
  • Eclipse started.

Confirmed all is OK by building and running a "Hello World" Java project.

0

For Windows 8 it is necessary to install both the x86 and x64 versions of Java. You can download them here. If you try install Java from your browser (using autodetect from the web page), Java will only install the x86 version.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .