0

I'm attempting to use spacemacs, elipse and eclimd for editing with autocompletion. However, eclimd is attempting to start the java server with the -command ping option. My version of Java does not support that option. I have been unable to find this option in the documentation. Is it deprecated? Which version of Java supports it?

java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

/usr/lib/jvm/java-8-oracle/bin/java -d64 -command ping -Dosgi.requiredJavaVersion=1.8 -Dosgi.instance.area.default=@user.home/eclipse-workspace -XX:+UseG1GC -Dosgi.dataAreaRequiresExplicitInit=true -Xms256m -Xmx1024m -jar /snap/eclipse/current/plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar --launcher.suppressErrors -debug -clean -refresh -application org.eclim.application
Unrecognized option: -command
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
David Prentiss
  • 548
  • 1
  • 6
  • 16

2 Answers2

2

No version of Java supports -command.

That option is supposed to be an argument for eclim, not for java

eclim -command ping

or presumably something like

java -d64 -Dosgi.requiredJavaVersion=1.8 -Dosgi.instance.area.default=@user.home/eclipse-workspace -XX:+UseG1GC -Dosgi.dataAreaRequiresExplicitInit=true -Xms256m -Xmx1024m -jar /snap/eclipse/current/plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar --launcher.suppressErrors -debug -clean -refresh -application org.eclim.application -command ping

Either you've configured something wrong, or something has a bug.

OrangeDog
  • 36,653
  • 12
  • 122
  • 207
  • The command as OrangeDog edited it runs correctly from the command line. This does not solve my problem but eliminates java as a source of the problem. – David Prentiss Oct 26 '18 at 14:38
0

There is no -cmd.

But maybe you are talking about a new feature in Java 11. You can now do:

java HelloWorld.java

Meaning: when you have a "single file class", with a main method, you can sidestep invoking javac first, to then run java with the class name. Instead, you can do the above and directly "run+compile" a .java file.

That feature was added with JEP 330.

GhostCat
  • 137,827
  • 25
  • 176
  • 248