15
votes

I installed a fresh Ubuntu 16.04 VM, Oracle JDK 7, and downloaded the latest Eclipse. But I am getting this error when I try to start Eclipse:

Unrecognized VM option 'UseStringDeduplication'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

Why am I getting this error on a fresh install? And is it a bad idea to remove that VM option?

6

6 Answers

20
votes

Latest version of Eclipse (Neon) requires Java 8 runtime, and the Eclipse website obnoxiously neglects to mention it anywhere from the homepage to the download link for Eclipse, not even a version warning at runtime for Eclipse.

1
votes

Same error for me in Kubuntu 14.04, eclipse Neon, I Removed -XX:+UseStringDeduplication from .ini file, it works for me

1
votes

I know, i'm little to late to the party. I got this issue lately on my Mac. I updated my eclipse (from Mars to Oxygen) all of the sudden i couldn't start my old project. First i thought, this must have something to do with the new eclipse, which wasn't all wrong. Because eclipse.ini file of Oxygen expected java-1.8.

I updated my java to latest (jdk1.8.0_152.jdk), but the problem remained, than i removed these parameters from the eclipse.ini, still was the same, i checked the "Run Configurations" and basically removed the same parameters from the arguments list. Now my projects seem to work just fine. I also needed to restore the platform, since Oxygen use e.4-platform.

  1. Remove these parameters from eclipse.ini file
  2. Select the project and go to "Run As"->"Run Configurations..."-> "Arguments" check the old configurations under "VM arguments" (it can be a product in case of an RCP-project)
  3. removed the VM-option(s)(actually, they can be more) not recognized and "Apply"-> "Run".
0
votes

I got the same error when I have installed Java 8 and Java 9 in my Ubuntu 16.04. My eclipse version was Neon. As https://wiki.eclipse.org/Eclipse/Installation#Eclipse_4.6_.28Neon.29 describes to start specific eclipse ide you need relevant JDK. For neon, it was Java 8. Since I installed Java 9 using apt-get it was the default JDK. so I have to change the default JDK to Java 8.

You can check which java version used in system-wide with

java -version

`If you want to see which are the versions of JDK installed in Ubuntu then run below command in shell.

sudo  update-java-alternatives --list

Then choose which version you want to set. After that run below command.

sudo  update-java-alternatives --set [JDK/JRE name e.g. java-8-oracle]

Now run again Eclipse. if the version was the reason to conflict, it will run now. Referred by http://menukanows.com/how-to-set-a-default-jdk-version-in-ubuntu/

0
votes

String Deduplication – A new feature in Java 8 Update 20

It means you should nt java 1.8 updated later or equal 20.

0
votes

I faced the same issue on Eclipse Oxygen in Ubuntu.

Tried:

  • Checking java version (It was already at 1.8.0 so according to the accepted answer, it should work.)
  • Removing -XX:+UseStringDeduplication from .ini file

Still didn't solve the problem. Then I saw @simgineer's comment:

In my case this was for eclipse oxygen. I had an older version of java 8 installed (jdk1.8.0_05) when I upgraded to the latest (jdk1.8.0_151) and updated my eclipse.ini to point to the latest as well (since it is recorded in there during installation) eclipse oxygen started working.

Solution:

Updated JDK from 1.8.0 to jdk1.8.0_231 and it got resolved. Voila! I didn't have to update anything in my eclipse.ini .