3

I'm a new Mac user, and I've been trying to install Eclipse IDE Oxygen for Java Devs, but I get the "An error has occurred. See the log file [workspace path]/.metadata/.log" error. Its a fresh, first-time install, and I've tried using the tar.gz download and the installer. I've seen other answers say to delete the .metadata folder, but the workspace folder has nothing in it after this failed installation.

I've tried the newest Java version, the legacy Java 6 for Mac, both with no luck. I tried using older versions of Eclipse as well, to no end.

Every Mac user in my class has come across the same issue as me, so is it some incompatibility with Java/Eclipse versions and Mac OS? How can we get this working?

TDillon
  • 31
  • 1
  • 3
  • 1
    - Anything in the `[workspace path]/.metadata/.log` file? – M. le Rutte Oct 04 '17 at 17:30
  • Which version of Java are you using? For Java 9 you have to edit the `eclipse.ini` and add `--add-modules=ALL-SYSTEM` – M. le Rutte Oct 04 '17 at 17:36
  • the workspace folder will show up after the error message shows, but its completely empty. – TDillon Oct 04 '17 at 17:36
  • Have you checked if it is empty with `ls -a` from the command prompt? – M. le Rutte Oct 04 '17 at 18:01
  • 1
    There will be a `.log` file in the `.metadata` directory but files and directories starting with `.` are hidden and aren't shown by Finder. If you are using Java 9 see [here](https://stackoverflow.com/a/46370112/2670892) – greg-449 Oct 04 '17 at 18:21

1 Answers1

4

Quoting Eclipse's known issues list:

Configure Eclipse for Java 9 modules Since the Eclipse SDK uses types that aren't in the java.base module, you need to add the following vmargs to eclipse.ini:

--add-modules=ALL-SYSTEM

Your project might fail to run because you use types that are neither in java.base or java.se.ee, e.g. types from javafx.base. In that case you have to figure out which module(s) you need to add with --add-modules.

So simply, add this line after -vmargs:

--add-modules=ALL-SYSTEM

Your eclipse.ini should look like that:

--launcher.appendVmargs
-vm
<path_to_java>\Java\jdk-9\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.8
--add-modules=ALL-SYSTEM

For reference, check the known issues of Eclipse with JVM running on SDK 9. Check them here

Also the bug was reported here

Sam
  • 71
  • 7