Unable to instantiate class WelcomeDashboard when

2019-08-15 20:53发布

问题:

OpenSUSE 13.2 running on VMware Player 6.0.3

I've installed Spring STS 3.6.4 today and when I start STS, I get the following error:

Plug-in "org.springsource.ide.eclipse.commons.gettingstarted" was unable to instantiate class "org.springsource.ide.eclipse.commons.gettingstarted.dashboard.WelcomeDashboard".

I've scoured the Internet and found various references to giving the STS directory 777 permissions and pointing fingers at the version of Java it's running with and none of these seem to help.

I've tried...

  • 32-bit and 64-bit OS/STS/Java

  • STS 3.6.3 SR1 (I have this running OK on OpenSUSE 13.1 on my notebook)

  • STS 3.6.4

Ive tried the following versions of Java...

  • java-1.8.0-openjdk-1.8.0 (out of the box with OS 13.2)
  • java-1.7.0-openjdk-1.7.0 ] jdk-7u72 from the Oracle web site
  • jdk-7u75 from the Oracle web site
  • jdk-8u40 from the Oracle web site

Always I get the same error message when STS start up.

I'd be really grateful if someone could shed any light on what's going wrong here.

Many thanks

Gary

回答1:

The 'WelcomeDashboard' uses JavaFX which requires Java 1.8 and GTK2 on unix systems. Eclipse 4.4 runs with GTK3 by default. You can switch it back to GTK2 by setting the environment variable "SWT_GTK3=0". Actually I recommend this because the GTK3 implementation of Eclipse SWT widget toolkit, while slowly getting better, is still quite buggy. So setting that variable will probably solve some other UI glitches you might otherwise experience.

I also recommend you use Oracle JDK 8 instead of OpenJDK as I've heard people having problems with OpenJDK.

Also note that the error you see about the WelcomeDashboard failing to load is relatively harmless as the dashboard is a non-essential component and it has an automatic fallback on the old-style dashboard welcome page which uses Eclipse form editor instead of JavaFX.

So it is pretty safe to just ignore the error, unless you really want the new dashboard.



回答2:

Not sure if you have solved your problem by now, but I wanted to tell how I solved mine for the benefit of anyone else who might face this problem.

I encountered this error while running STS 3.6.4 on Archlinux (with OpenJDK 8). After some research I installed the java-openjfx package and the problem was gone.

Therefore, you probably need to install your distribution's equivalent of the OpenJavaFX package and this should solve your problem too.