28

Today I restarted my machine, and Eclipse (3.5, downloaded recently) shows a strange behaviour:

  • shows splash screen for less than a sec
  • quits

This is in 100% of the cases, so I can't start Eclipse at all.

Where can I find logs about this?

I deleted all eclipse resources and re-unzipped it. Same thing.

I have enough memory (IntelliJ runs fine), and my anti-virus software doesn't show any activity related to closing eclipse.

Any ideas what might have caused this?

Bozho
  • 459
  • 1
  • 4
  • 10
  • 1
    As other tools closely related to coding activities, I have always considered eclipse (like Git, SVN, ...) as a SO topic, certainly not a SU ("General computer software or hardware troubleshooting") topic. That being said, if you have your answer, that is all that matter. – VonC Jun 02 '10 at 19:36
  • 1
    I reinstall JDK and JRE and my eclipse runs again :D –  Jun 13 '11 at 17:37

9 Answers9

44

one thing that i've come up with is deleting the folder:

workspace/.metadata/.plugins/org.eclipse.e4.workbench"

where workspace is your eclipse workspace directory

avim
  • 103
  • 4
android developer
  • 1,001
  • 1
  • 12
  • 17
  • 2
    Super!! +1 for the solution.Saved me a lot of headache. – GuruM Nov 28 '13 at 07:22
  • 3
    @GuruM I wonder how I got this solution. maybe I did a binary search about which folder to remove, once I've found out that deleting all of them also fixes it. – android developer Jul 06 '14 at 14:22
  • 3
    I cant seem to find that – Ṅobody Wants To Sep 11 '14 at 07:39
  • 1
    can someone please share the full path of the folder? thank you. – Rodniko Jun 19 '15 at 12:08
  • @Rodniko That's when the projects you create are created. You can check it in the settings screen too. – android developer Jun 19 '15 at 13:16
  • 1
    Awesome, saved the day! The issue was I was using viewing a _gigantic_ file (loading to an embedded H2 db, not a class file ;), and the log showed eclipse was running out of memory at startup, probably because it was trying to load that crazy file, so deleting the current 'workbench' did the trick. Apparently after all these years, the built in editor or memory management within eclipse is still lacking. Can't complain too much - it is free software - but to get stuck in a state like this where you almost have to reinstall the workspace seems to be a bit much.. – michaelok Jan 03 '18 at 20:29
  • 1
    This is the best solution for the whoops I clicked on a big file and now eclipse will not open any more scenario. – demongolem Jan 28 '20 at 13:13
9

Start it from the command-line and see if it produces any error messages.

Douglas Leeder
  • 1,485
  • 9
  • 13
  • 1
    how exactly?... – Bozho Jun 02 '10 at 14:34
  • 8
    On windows, it is best to use the console version of the executable when running from the command line, so something like "eclipsec -consoleLog -debug" might be useful. –  Jun 02 '10 at 16:03
  • 1
    getting error in console: `Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object` – Mohammad Faisal Oct 08 '15 at 05:11
  • if I do add [`-vm `](http://superuser.com/questions/148179/eclipse-shows-splash-screen-and-closes-how-to-fix/148183#148183) then getting error `could not create virtual machine` – Mohammad Faisal Oct 08 '15 at 05:14
5

I added this in eclipse.ini:

-vm 
C:/Program Files/Java/jdk1.6.0_20/jre/bin/javaw.exe

And it started. Then, however, one of my projects (a simple test project) did not resolve java.lang.String and java.lang.System. I changed the JRE to JDK/JRE, and it worked.

JAVA_HOME and JRE_HOME were pointing to the above location.

Bozho
  • 459
  • 1
  • 4
  • 10
  • 2
    The eclipse launcher does not consult JAVA_HOME or JRE_HOME. It looks on the system search path. This might be useful: http://wiki.eclipse.org/Equinox_Launcher –  Jun 02 '10 at 16:06
  • +1 If the Java installation on the system is messed up, or if the system default Java VM does not work with Eclipse, this lets you explicitly tell Eclipse which VM to use. – sleske Jul 15 '10 at 21:53
4

There's a .log file in the .metadata directory inside each workspace, which often contains a number of stack traces from the Eclipse internals. Startup crashes are usually found here. I'm assuming you have Eclipse configured to start up in a specific workspace automatically, without prompting you to pick one at startup.

skaffman
  • 238
  • 2
  • 6
2

I have found that starting eclipse up with the arguments -clean -clearPersistedState will often fix crashes for me.

Thomas
  • 223
  • 3
  • 7
1

Just for completeness: Try starting Eclipse with -clean (which re-scans the installed plugins and rebuilds the caches in $ECLIPSE_HOME/configuration).

Generally, you get back your projects after removing .metadata with import->existing projects.

Alteratively, some project's .settings may be damaged.

Look at the error stack (in .metadata/.log) to find out which plugin is making problems, and try to remove its prefs.

An easy way to try all this is to create a new workspace (start eclipse with -data if you don't get the dialog) and to manually copy the projects over.

user32648
  • 130
  • 11
1

Open eclipse.ini. If the line -showsplash is there, remove it.

If it is not present, add -nosplash

I know it's strange recommending to not show the splash screen, but it occasionally causes issues on some machines / Java configurations.

Powerlord
  • 824
  • 4
  • 10
0

I had this same issue and nothing worked for me using Eclipse Luna 64 bit. I had originally had Java 1.6, Java 1.7 and Java 1.8 installed, but had removed Java 1.8 using the Windows 7 control panel. I saw the splash screen once for a split second, then that was it and no errors, no log files, nor a .lock file.

I had been working through a different error (error code 13) with 32 bit/ 64 bit incompatibilities between java and eclipse. So I settled on 64 bit for both to get around that issue. Then afterwards I reinstalled Java 1.8 back in again it started working.

0

If you're going to tweak anything in eclipse.ini, ensure you keep a copy of the original. For me it was as simple as -Xmx was set to 5 instead of 5g

Cybermonk
  • 113
  • 3