emacs-eclim / emacs-eclim

This project brings some of the great eclipse features to emacs developers. It is based on the eclim project, which provides eclipse features for vim. Development from senny/emacs-eclim has moved here.
http://www.emacswiki.org/emacs/EmacsEclim
165 stars 29 forks source link

start-eclimd unrecognized option: -command #79

Closed Sunhick closed 6 years ago

Sunhick commented 6 years ago

error in process filter: /usr/bin/java -version java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) JAVA_VERSION=8

/usr/bin/java -d64 -command project_list -Dosgi.requiredJavaVersion=1.8 -Dosgi.instance.area.default=@user.home/eclipse-workspace -XX:+UseG1GC -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Xms256m -Xmx1024m -Declipse.p2.max.threads=10 -XstartOnFirstThread -jar /Users/Sunny/eclipse/java-oxygen/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.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.

Steps to reproduce the problem

(defun my-java-mode-hook () (eclim-mode t)) (add-hook 'java-mode-hook 'my-java-mode-hook)



### Related issues
* https://github.com/syl20bnr/spacemacs/issues/5579 : I don't have ```eclim``` in ```/Users/Sunny/eclipse/java-oxygen/Eclipse.app/Contents/Eclipse/```. But  i have eclimd. Setting eclim-executable to ```/Users/Sunny/eclipse/java-oxygen/Eclipse.app/Contents/Eclipse/eclim``` will throw error ```wrong type argument stringp nil``` when i invoke ```start-eclimd``` from Emacs.

* https://github.com/senny/emacs-eclim/issues/137

## Environment & Version information
- Mac OS (high sierra)

### package version information
MELPA eclim              20171113.1754 installed             An interface to the Eclipse IDE.

### Java Development Kit Version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
JAVA_VERSION=8

### Eclipse version
Eclipse 4.7.2 (Oxygen)

### Eclim version
eclim 2.7.1

### Emacs version
25.3

### Operating system
Mac OS (High Sierra)
bk322 commented 6 years ago

Same here. Why was this closed?

casch-at commented 6 years ago

https://github.com/emacs-eclim/emacs-eclim/wiki/Troubleshooting @bk322

dscole commented 6 years ago

I had the same issue and after digging around I found out that eclipse seems has multiple locations to where it installs plugins. For example I have the eclipse directory that contains plugin, a ~/.eclipse directory that seems to have plugins and a ~/.p2 directory that seems to have more. eclim seems to install itself in ~/.p2/pool/plugins/org.eclim_<version>. you need to set eclim-executable to ~/.p2/pool/plugins/org.eclim_<version>/bin/eclim. Note that it's eclim not eclimd.

Now just to make it a bit more confusing eclim also installs an executable (or rather a link to an executable) called eclimd in the eclipse directory. It seems you should ignore that file :)

xenomorph1096 commented 6 years ago

Dude, you are such a lifesaver .... I just could not get this to work .... good thing I found this thread .... The instructions in the readme are not clear enough. Since I used my OS repo to install eclipse, my eclipse root dir is /usr/lib/eclipse, but the eclim installer created a local ~/.eclipse directory... even though I specified the correct path during installation.

alienbogart commented 5 years ago

``

I had the same issue and after digging around I found out that eclipse seems has multiple locations to where it installs plugins. For example I have the eclipse directory that contains plugin, a ~/.eclipse directory that seems to have plugins and a ~/.p2 directory that seems to have more. eclim seems to install itself in ~/.p2/pool/plugins/org.eclim_<version>. you need to set eclim-executable to ~/.p2/pool/plugins/org.eclim_<version>/bin/eclim. Note that it's eclim not eclimd.

Now just to make it a bit more confusing eclim also installs an executable (or rather a link to an executable) called eclimd in the eclipse directory. It seems you should ignore that file :)

This really should be in documentation.