How to install eclim on Windows and use it through cygwin vim?

1,244 views
Skip to first unread message

Martin T.

unread,
Feb 12, 2014, 8:46:39 AM2/12/14
to eclim...@googlegroups.com
I can't figure out how to install eclim correctly in cygwin.

My cygwin is installed to E:\cygwin64

I have a JDK installation in C:\Program Files\Java\jdk1.7.0

Which eclipse version do I need, the windows or linux one?

I tried the eclipse windows version.

When I use the installer do I just point it at the windows directories where eclipse and my .vim directory are (E:\cygwin64\opt\eclipse\ & E:\cygwin64\home\martin\)

How do I start the eclimd once the installation finished, there are only eclimd.bat and eclimd.cmd available.

Can I setup the daemon to start whenever vim opens a java file?

Eric Van Dewoestine

unread,
Feb 12, 2014, 10:44:29 AM2/12/14
to eclim...@googlegroups.com
On 2014-02-12 05:46:39, Martin T. wrote:
> I can't figure out how to install eclim correctly in cygwin.
>
> My cygwin is installed to E:\cygwin64
>
> I have a JDK installation in C:\Program Files\Java\jdk1.7.0
>
> Which eclipse version do I need, the windows or linux one?

You should install the windows version.

> I tried the eclipse windows version.
>
> When I use the installer do I just point it at the windows directories
> where eclipse and my .vim directory are (
> E:\cygwin64\opt\eclipse\ &

Is this a Windows version of eclipse that just happens to be installed
in your cygwin directory?

> E:\cygwin64\home\martin\)

I'm assuming the .vim was inadvertently dropped from this path here,
but if not, make sure that you've installed the eclim vim files in a
supported vim runtime path.

> How do I start the eclimd once the installation finished, there are only
> eclimd.bat and eclimd.cmd available.

You would start eclimd using either of those (the .cmd scripts are
being removed in the next version though). The eclim vim files have
logic in them to deal with converting cygwin paths to Windows paths
and vice versa so that the Windows version of eclipse and cygwin
version of vim can communicate. So basically you just use eclim as if
you were doing so using gvim for Windows and it should "just work".

> Can I setup the daemon to start whenever vim opens a java file?

This is not currently supported.

--
eric
Message has been deleted

Martin T.

unread,
Feb 13, 2014, 4:03:35 AM2/13/14
to eclim...@googlegroups.com
Is this a Windows version of eclipse that just happens to be installed
in your cygwin directory?

Yes, i just unzipped it there
 
> E:\cygwin64\home\martin\)

I'm assuming the .vim was inadvertently dropped from this path here,
but if not, make sure that you've installed the eclim vim files in a
supported vim runtime path.

With the gui installer i have specified the vim installation directory manually (E:\cygwin64\usr\share\vim\vim74)

martin@HAL9000 ~
$ java -jar eclim_2.3.2.jar

You would start eclimd using either of those (the .cmd scripts are 
being removed in the next version though). The eclim vim files have
logic in them to deal with converting cygwin paths to Windows paths
and vice versa so that the Windows version of eclipse and cygwin
version of vim can communicate. So basically you just use eclim as if
you were doing so using gvim for Windows and it should "just work".

Ater the installation finishes I start the batch file from my cygwin prompt
$ /opt/eclipse/eclimd.bat

I get a terminal window
Start VM: -Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-Djava.class.path=E:\cygwin64\opt\eclipse\\\plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
-os win32
-ws win32
-arch x86_64
-launcher E:\cygwin64\opt\eclipse\\eclipse.exe
-name Eclipse
--launcher.library E:\cygwin64\opt\eclipse\\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130521-0416\eclipse_1503.dll
-startup E:\cygwin64\opt\eclipse\\\plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.appendVmargs
-product org.eclipse.epp.package.standard.product
-debug
-clean
-refresh
-application org.eclim.application
-vm C:\Program Files (x86)\Java\jdk1.6.0\bin\..\jre\bin\client\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-Djava.class.path=E:\cygwin64\opt\eclipse\\\plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar

And a Eclipse window
- No exit data available.

When I click OK in the eclipse window I get another eclipse window
- Failed to load the JNI shared library "C:\Program Files(x86)\Java\jdk1.6.0\bin\..\jre\bin\client\jvm.dll".

When i click OK this and the terminal window close and nothing else happens.

This is the output from the installer
martin@HAL9000 ~
$ java -jar eclim_2.3.2.jar
Buildfile: installer.xml
2014-02-13 09:58:34,648 INFO  [org.formic.Installer] Running Installer...
2014-02-13 09:58:39,317 INFO  [org.formic.util.CommandExecutor] vim.bat -f -X -u NONE -U NONE --cmd redir! > E:/cygwin64/tmp/eclim_installer3824041925120630197.tmp | silent! echo &rtp | quit
java.io.IOException: Cannot run program "vim.bat": CreateProcess error=2,
The system can not find the specified file
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
        at java.lang.Runtime.exec(Runtime.java:593)
        at java.lang.Runtime.exec(Runtime.java:466)
        at org.formic.util.CommandExecutor.run(CommandExecutor.java:107)
Caused by: java.io.IOException: CreateProcess error=2,
The system can not find the specified file
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:177)
        at java.lang.ProcessImpl.start(ProcessImpl.java:28)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
        ... 3 more
2014-02-13 09:58:39,320 INFO  [org.formic.util.CommandExecutor] gvim.bat -f -X -u NONE -U NONE --cmd redir! > E:/cygwin64/tmp/eclim_installer3824041925120630197.tmp | silent! echo &rtp | quit
java.io.IOException: Cannot run program "gvim.bat": CreateProcess error=2,
The system can not find the specified file
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
        at java.lang.Runtime.exec(Runtime.java:593)
        at java.lang.Runtime.exec(Runtime.java:466)
        at org.formic.util.CommandExecutor.run(CommandExecutor.java:107)
Caused by: java.io.IOException: CreateProcess error=2,
The system can not find the specified file
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:177)
        at java.lang.ProcessImpl.start(ProcessImpl.java:28)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
        ... 3 more
2014-02-13 09:58:39,321 INFO  [org.formic.util.CommandExecutor] vim.exe -f -X -u NONE -U NONE --cmd redir! > E:/cygwin64/tmp/eclim_installer3824041925120630197.tmp | silent! echo &rtp | quit
Checking for user vim files directory: C:\Users\martin\vimfiles
2014-02-13 09:59:39,656 INFO  [org.formic.util.CommandExecutor] java -Xmx256m -XX:MaxPermSize=128m -jar E:\cygwin64\opt\eclipse\plugins\org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -clean -application org.eclipse.equinox.p2.director -repository file://E:\cygwin64\tmp\formic_1908494959\update -installIU org.eclim.installer.feature.group
2014-02-13 09:59:43,085 INFO  [org.formic.util.CommandExecutor] java -Xmx256m -XX:MaxPermSize=128m -jar E:\cygwin64\opt\eclipse\plugins\org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -clean -application org.eclim.installer.application -info
2014-02-13 09:59:45,331 INFO  [org.eclim.installer.step.EclipseInfo]   Profile: epp.package.standard
2014-02-13 09:59:45,331 INFO  [org.eclim.installer.step.EclipseInfo] eclipse.profile=epp.package.standard
2014-02-13 09:59:45,331 INFO  [org.eclim.installer.step.EclipseInfo]   Configuration: file:/E:/cygwin64/opt/eclipse/configuration/
2014-02-13 09:59:45,331 INFO  [org.eclim.installer.step.EclipseInfo] eclipse.local=E:\cygwin64\opt\eclipse
2014-02-13 09:59:45,333 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.platform 4.3.0.v20130605-2000 file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,333 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.help 2.0.0.v20130605-2000 file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,333 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.emf.ecore 2.9.0.v20130528-0742 file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,333 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.cvs 1.4.0.v20130605-2000 file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,333 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.epp.mpc 1.2.0.v20130612-1900 file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,333 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.egit 3.0.0.201306101825-r file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,333 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclim.installer 2.3.2 file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,333 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.jgit 3.0.0.201306101825-r file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,333 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.rcp 4.3.0.v20130605-2000 file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,334 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.jdt 3.9.0.v20130605-2000 file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,334 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.emf.common 2.9.0.v20130528-0742 file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,334 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.pde 3.9.0.v20130605-2000 file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:45,334 INFO  [org.eclim.installer.step.EclipseInfo]   Feature: org.eclipse.epp.package.standard.feature 2.0.0.20130613-0530 file:/E:/cygwin64/opt/eclipse/
2014-02-13 09:59:57,536 INFO  [ANT] [eclim:shutdown] Unable to shut down eclimd (9091): java.lang.NullPointerException - null
2014-02-13 09:59:57,645 INFO  [ANT]     [mkdir] Created dir: E:\cygwin64\tmp\formic_1908494959\update-site\plugins
2014-02-13 09:59:57,645 INFO  [ANT]     [mkdir] Created dir: E:\cygwin64\tmp\formic_1908494959\update-site\features
2014-02-13 09:59:57,685 INFO  [ANT] [eclim:unzip] Expanding: E:\cygwin64\tmp\eclim-update-site2596197175879634777.zip into E:\cygwin64\tmp\formic_1908494959\update-site
2014-02-13 09:59:57,972 INFO  [ANT] [formic:template] Evaluating template: E:\cygwin64\tmp\formic_1908494959\update-site\artifacts.xml
2014-02-13 09:59:57,979 INFO  [ANT] [formic:template] Moving 1 file to E:\cygwin64\tmp\formic_1908494959\update-site
2014-02-13 09:59:57,980 INFO  [ANT] [formic:template] Evaluating template: E:\cygwin64\tmp\formic_1908494959\update-site\content.xml
2014-02-13 09:59:57,982 INFO  [ANT] [formic:template] Moving 1 file to E:\cygwin64\tmp\formic_1908494959\update-site
2014-02-13 09:59:57,983 INFO  [ANT] [formic:template] Evaluating template: E:\cygwin64\tmp\formic_1908494959\update-site\features\org.eclim_2.3.2\feature.xml
2014-02-13 09:59:57,985 INFO  [ANT] [formic:template] Moving 1 file to E:\cygwin64\tmp\formic_1908494959\update-site\features\org.eclim_2.3.2
2014-02-13 09:59:58,003 INFO  [ANT]       [jar] Building jar: E:\cygwin64\tmp\formic_1908494959\update-site\artifacts.jar
2014-02-13 09:59:58,007 INFO  [ANT]    [delete] Deleting: E:\cygwin64\tmp\formic_1908494959\update-site\artifacts.xml
2014-02-13 09:59:58,010 INFO  [ANT]       [jar] Building jar: E:\cygwin64\tmp\formic_1908494959\update-site\content.jar
2014-02-13 09:59:58,011 INFO  [ANT]    [delete] Deleting: E:\cygwin64\tmp\formic_1908494959\update-site\content.xml
2014-02-13 09:59:58,014 INFO  [ANT]       [jar] Building jar: E:\cygwin64\tmp\formic_1908494959\update-site\features\org.eclim_2.3.2.jar
2014-02-13 09:59:58,020 INFO  [ANT]    [delete] Deleting directory E:\cygwin64\tmp\formic_1908494959\update-site\features\org.eclim_2.3.2
2014-02-13 09:59:58,031 INFO  [ANT]       [jar] Building jar: E:\cygwin64\tmp\formic_1908494959\update-site\plugins\org.eclim.core_2.3.2.jar
2014-02-13 09:59:58,083 INFO  [ANT]    [delete] Deleting directory E:\cygwin64\tmp\formic_1908494959\update-site\plugins\org.eclim.core_2.3.2
2014-02-13 09:59:58,092 INFO  [ANT]       [jar] Building jar: E:\cygwin64\tmp\formic_1908494959\update-site\plugins\org.eclim.jdt_2.3.2.jar
2014-02-13 09:59:58,231 INFO  [ANT]    [delete] Deleting directory E:\cygwin64\tmp\formic_1908494959\update-site\plugins\org.eclim.jdt_2.3.2
2014-02-13 09:59:58,243 INFO  [ANT]       [jar] Building jar: E:\cygwin64\tmp\formic_1908494959\update-site\plugins\org.eclim.vimplugin_2.3.2.jar
2014-02-13 09:59:58,252 INFO  [ANT]    [delete] Deleting directory E:\cygwin64\tmp\formic_1908494959\update-site\plugins\org.eclim.vimplugin_2.3.2
2014-02-13 09:59:58,264 INFO  [ANT]       [jar] Building jar: E:\cygwin64\tmp\formic_1908494959\update-site\plugins\org.eclim_2.3.2.jar
2014-02-13 09:59:58,535 INFO  [ANT]    [delete] Deleting directory E:\cygwin64\tmp\formic_1908494959\update-site\plugins\org.eclim_2.3.2
2014-02-13 09:59:58,552 INFO  [ANT] [eclim:installiu] Installing org.eclim...
2014-02-13 09:59:58,554 INFO  [org.formic.util.CommandExecutor] java -Xmx256m -XX:MaxPermSize=128m -jar E:\cygwin64\opt\eclipse\plugins\org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -clean -application org.eclipse.equinox.p2.director -repository file://E:\cygwin64\tmp\formic_1908494959/update-site -installIU org.eclim.feature.group
2014-02-13 10:00:02,266 INFO  [ANT]      [copy] Copying 5 files to E:\cygwin64\opt\eclipse
2014-02-13 10:00:02,300 INFO  [ANT] [eclim:unzip] Expanding: E:\cygwin64\tmp\vim-plugins1991132049231514916.zip into E:\cygwin64\usr\share\vim\vim74
2014-02-13 10:00:02,450 ERROR [ANT]      [move] Warning: E:\cygwin64\usr\share\vim\vim74\eclim\resources does not exist.
2014-02-13 10:00:02,460 WARN  [ANT]      [echo]
2014-02-13 10:00:02,460 WARN  [ANT]      [echo] ##
2014-02-13 10:00:02,460 WARN  [ANT]      [echo] # Please wait while the eclim installer feature is removed from eclipse...
2014-02-13 10:00:02,460 WARN  [ANT]      [echo] ##
2014-02-13 10:00:02,460 WARN  [ANT]      [echo]
2014-02-13 10:00:02,462 INFO  [ANT] [eclim:uninstalliu] Uninstalling org.eclim.installer...
2014-02-13 10:00:02,462 INFO  [org.formic.util.CommandExecutor] java -Xmx256m -XX:MaxPermSize=128m -jar E:\cygwin64\opt\eclipse\plugins\org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -clean -application org.eclipse.equinox.p2.director -repository file://E:\cygwin64\tmp\formic_1908494959\update -uninstallIU org.eclim.installer.feature.group
2014-02-13 10:00:04,606 INFO  [org.eclim.installer.ant.UninstallIUTask] Uninstalling org.eclim.installer.feature.group 2.3.2.
2014-02-13 10:00:05,730 INFO  [org.eclim.installer.ant.UninstallIUTask] Operation completed in 1131 ms.
2014-02-13 10:00:05,985 INFO  [ANT] [eclim:uninstalliu] Invoking p2 gc...
2014-02-13 10:00:05,986 INFO  [org.formic.util.CommandExecutor] java -Xmx256m -XX:MaxPermSize=128m -jar E:\cygwin64\opt\eclipse\plugins\org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -clean -application org.eclipse.equinox.p2.garbagecollector.application -profile epp.package.standard
2014-02-13 10:00:08,986 INFO  [org.eclim.installer.ant.UninstallIUTask] Removing temp repositories from p2 prefs: E:\cygwin64\opt\eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.standard.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
2014-02-13 10:00:08,988 INFO  [ANT]      [move] Moving 1 file to E:\cygwin64\opt\eclipse\p2\org.eclipse.equinox.p2.engine\profileRegistry\epp.package.standard.profile\.data\.settings
2014-02-13 10:00:10,877 INFO  [org.formic.Installer] Installer Finished.
2014-02-13 10:00:10,878 DEBUG [ANT]
BUILD SUCCESSFUL
Total time: 1 minute 36 seconds

Eric Van Dewoestine

unread,
Feb 13, 2014, 9:55:49 AM2/13/14
to eclim...@googlegroups.com
Sounds like something is wrong with your java installation. Can you
start the eclipse gui or other java applications using your jdk1.6.0
jvm?
> --
> You received this message because you are subscribed to the Google Groups "eclim-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to eclim-user+...@googlegroups.com.
> To post to this group, send email to eclim...@googlegroups.com.
> Visit this group at http://groups.google.com/group/eclim-user.
> For more options, visit https://groups.google.com/groups/opt_out.

--
eric

Eric Van Dewoestine

unread,
Feb 13, 2014, 10:00:11 AM2/13/14
to eclim...@googlegroups.com
Actually, the problem is most likely that your eclipse architecture
doesn't match your jvm architecture. Make sure both are either 64bit
or 32bit.
--
eric

Martin T.

unread,
Feb 13, 2014, 10:03:20 AM2/13/14
to eclim...@googlegroups.com
Yes, without any problems. Can i specify a different java version for eclim?



--
You received this message because you are subscribed to a topic in the Google Groups "eclim-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/eclim-user/8ETPAY0Z7Kk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to eclim-user+...@googlegroups.com.

Eric Van Dewoestine

unread,
Feb 13, 2014, 10:17:15 AM2/13/14
to eclim...@googlegroups.com
On 2014-02-13 16:03:20, Martin T. wrote:
> Yes, without any problems.

You can start the eclipse gui without issues?

All the eclimd.bat file does is start eclipse with a different
application arg, so if you can start the eclipse gui, then eclimd
should start as well. They should both be picking up the same jvm.

> Can i specify a different java version for eclim?

On Windows eclimd simply calls the eclipse executable, so you can set
the jvm that eclimd uses by setting the jvm that eclipse uses:

http://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM

Martin T.

unread,
Feb 14, 2014, 4:48:57 AM2/14/14
to eclim...@googlegroups.com
Ok its starting now.

I specified JDK 1.7 64bit in the /opt/eclipse/eclipse.ini

:PingEclim

produces this output

eclim   2.3.2
eclipse 4.3.0


I had to reinstall eclim to the right places

Vimfiles
E:\cygwin64\home\r892107\.spf13-vim-3\.vim

Eclipse Home (windows version 64 bit)
E:\cygwin64\opt\eclipse

Specify 64 bit JDK if it's not the system default
E:\cygwin64\opt\eclipse\eclipse.ini
  -vm
  C:/Program Files/Java/jdk1.7.0/bin/javaw.exe


The new problem is that completion does not work. When I try this
System
.<ctrl-x><ctrl-o>
I get the message
E764: Option 'omnifunc' is not set
This is my .vimrc.local
autocmd FileType java setlocal omnifunc=javacomplete#Complete
let g:haddock_browser = "/cygdrive/c/Program\ Files\ (x86)/Mozilla\ Firefox/firefox.exe"
let g:haddock_docdir = "/cygdrive/c/Program\ Files\ (x86)/Haskell\ Platform/2013.2.0.0/doc/"
let g:EclimCompletionMethod = 'omnifunc'

Eric Van Dewoestine

unread,
Feb 14, 2014, 9:30:50 AM2/14/14
to eclim...@googlegroups.com
You may not have file type plugins enabled. Try running :EclimValidate
to see if it provides any info. If not, then post the results of
running the following while you have the java file you are testing
with open:

:set ft?
:verbose set completefunc?
:verbose set omnifunc?

Martin T.

unread,
Feb 14, 2014, 9:38:53 AM2/14/14
to eclim...@googlegroups.com
:EclimValidate

does not return anything

:set ft?
  filetype=java


:verbose set completefunc?
  completefunc=neocomplcache#complete#auto_complete
        Last set by ~/.spf13-vim-3/.vim/bundle/neocomplcache/autoload/neocomplcache/init.vim

:verbose set omnifunc?
  omnifunc=
        Last set by ~/.vimviews/=+cygdrive=+e=+workspace=+CAMM=+CAMM=+amm-plugin=+src=+main=+java=+com=+rwe=+amm=+plugin=+sender=+MessageSenderFactory.java=

Eric Van Dewoestine

unread,
Feb 14, 2014, 10:13:43 AM2/14/14
to eclim...@googlegroups.com
On 2014-02-14 15:38:53, Martin T. wrote:
> :EclimValidate
>
> does not return anything

It should always print something. Check :messages

> :set ft?
> filetype=java
>
>
> :verbose set completefunc?
> completefunc=neocomplcache#complete#auto_complete
> Last set
> by~/.spf13-vim-3/.vim/bundle/neocomplcache/autoload/neocomplcache/init.vim
>
> :verbose set omnifunc?
> omnifunc=
> Last set
> by~/.vimviews/=+cygdrive=+e=+workspace=+CAMM=+CAMM=+amm-plugin=+src=+main=+java=+com=+rwe=+amm=+plugin=+sender=+MessageSenderFactory.java=

That's an odd one that I've never seen before.

I would try running vim with the bare minimum settings since something
in spf13 could be causing problems.

Since it looks like you installed the eclim vim files into the same
dir as the rest of spf13, I tried to construct the following command
to only load eclim... hopefully this works:

$ vim -u NONE -U NONE \
--cmd "set nocp | sy on | filetype plugin indent on" \
--cmd "let g:EclimBaseDir = '$HOME/.spf13-vim-3/.vim'" \
--cmd "exec 'so ' . g:EclimBaseDir . '/plugin/eclim.vim'" \
--cmd "let paths = glob(g:EclimBaseDir . '/eclim/plugin/*.vim')" \
--cmd "for p in split(paths, '\n') | exec 'so' p | endfor"

After running that, make sure :PingEclim works and then try editing
your java file again and checking:

:verbose set completefunc?

Then, assuming your java file is in an eclipse project, you can try
some code completion, but use <c-x><c-u> instead of <c-o>.

Martin T.

unread,
Feb 14, 2014, 10:34:36 AM2/14/14
to eclim...@googlegroups.com
On Fri, Feb 14, 2014 at 4:13 PM, Eric Van Dewoestine <erva...@gmail.com> wrote:
On 2014-02-14 15:38:53, Martin T. wrote:
> :EclimValidate
>
> does not return anything

It should always print something. Check :messages

That's the result

Übersetzt von Georg Dahn <gor...@yahoo.co.uk>
"/cygdrive/e/workspace/CAMM/CAMM/amm-plugin/src/main/java/com/rwe/amm/plugin/sender/MessageSenderFactory.java" [noeol][dos] 58L, 1677C
Result: OK, required settings are valid.

Do i need to create a project with eclim to enable completition or can I just navigate into an existing project and edit the source files?

Eric Van Dewoestine

unread,
Feb 14, 2014, 11:01:38 AM2/14/14
to eclim...@googlegroups.com
If your project shows up in the result of :ProjectList, then you
should be fine.

--
eric

Martin T.

unread,
Feb 17, 2014, 7:55:10 AM2/17/14
to eclim...@googlegroups.com
The project does not show up and :ProjectInfo outputs

Unable to determine the project. Please specify a project name or execute from a valid project directory

I am opening vim inside the directory with .project file that was created by eclipse.

Starting vim like this

$ vim -u NONE -U NONE \
  --cmd "set nocp | sy on | filetype plugin indent on" \
  --cmd "let g:EclimBaseDir = '$HOME/.spf13-vim-3/.vim'" \
  --cmd "exec 'so ' . g:EclimBaseDir . '/plugin/eclim.vim'" \
  --cmd "let paths = glob(g:EclimBaseDir . '/eclim/plugin/*.vim')" \
  --cmd "for p in split(paths, '\n') | exec 'so' p | endfor"

and executing that
 :verbose set completefunc?

outputs this
 completefunc=



--
eric

Eric Van Dewoestine

unread,
Feb 18, 2014, 9:57:31 AM2/18/14
to eclim...@googlegroups.com
On 2014-02-17 13:55:10, Martin T. wrote:
> The project does not show up and :ProjectInfo outputs
>
> Unable to determine the project. Please specify a project name or execute
> from a valid project directory
>
> I am opening vim inside the directory with .project file that was created
> by eclipse.

Perhaps your workspace directory is not at the default location used
by eclim? During startup eclimd will print out the workspace it is
using, and you can change[1] that location if necessary.

[1] http://eclim.org/faq.html#how-do-i-tell-eclim-which-eclipse-workspace-to-use

> Starting vim like this
> $ vim -u NONE -U NONE \
> --cmd "set nocp | sy on | filetype plugin indent on" \
> --cmd "let g:EclimBaseDir = '$HOME/.spf13-vim-3/.vim'" \
> --cmd "exec 'so ' . g:EclimBaseDir . '/plugin/eclim.vim'" \
> --cmd "let paths = glob(g:EclimBaseDir . '/eclim/plugin/*.vim')" \
> --cmd "for p in split(paths, '\n') | exec 'so' p | endfor"
>
> and executing that
> :verbose set completefunc?
>
> outputs this
> completefunc=

Was this while editing a java file? Did you check that eclim was
loaded (:messages, :PingEclim)? The more details you give the faster
this will go.

If I were you I'd move spf13 out of the way and install the eclim vim
files into an empty ~/.vim directory so you can see that it works,
then start merging it into spf13 to try and figure out if spf13 (or
some other aspect of your vim environment) is the problem, and if so,
what part of it is the problem.

Martin T.

unread,
Feb 19, 2014, 10:47:24 AM2/19/14
to eclim...@googlegroups.com
Okay,
Eclimd is running, I am inside a Project, completion starts
:PingEclim
eclim   2.3.2
eclipse 4.3.1

:ProjectInfo
Name:      ZMQ_Java
Path:      E:/workspace/zmq/ZMQ_Java
Workspace: C:/Users/r892107/workspace
Open:      true
Natures:   java

but completion complains
System.<ctrl-x><ctrl-o> // System cannot be resolved to a variable

:Validate
loc - (1 of 17): The type java.lang.Object cannot be resolved. It is indirectly referenced from reuired .class files
loc - (2 of 17): The import java.text cannot be resolved
and so on




Martin T.

unread,
Feb 20, 2014, 4:10:24 AM2/20/14
to eclim...@googlegroups.com
The :Validation fails on a fresh installation of vim without using spf13

Eric Van Dewoestine

unread,
Feb 20, 2014, 10:30:12 AM2/20/14
to eclim...@googlegroups.com
On 2014-02-19 16:47:24, Martin T. wrote:
> Okay,
> Eclimd is running, I am inside a Project, completion starts
> :PingEclim
> eclim 2.3.2
> eclipse 4.3.1
>
> :ProjectInfo
> Name: ZMQ_Java
> Path: E:/workspace/zmq/ZMQ_Java
> Workspace: C:/Users/r892107/workspace
> Open: true
> Natures: java
>
> but completion complains
> System.<ctrl-x><ctrl-o> // System cannot be resolved to a variable
>
> :Validate
> loc - (1 of 17): The type java.lang.Object cannot be resolved. It is
> indirectly referenced from reuired .class files
> loc - (2 of 17): The import java.text cannot be resolved
> and so on

The only way I know to reproduce those validation errors would be to
have the following entry (which eclipse adds by default) missing from
your project's .classpath file:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

If you do have that entry, then it would seem that eclipse is unable
to resolve your jvm (perhaps you have a custom one set for that
project?). This issue is not eclim specific, so you should have the
same validation errors if you open the same file in the eclipse gui.
Without access to your project and eclipse install I can't provide any
tips for resolving this aside from suggesting that you google[1] around
for cases where other users have had this problem with eclipse and how
they've resolved it.

[1] https://www.google.com/search?q=eclipse+java.lang.object+cannot+be+resolved
> You received this message because you are subscribed to the Google Groups "eclim-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to eclim-user+...@googlegroups.com.
> To post to this group, send email to eclim...@googlegroups.com.
> Visit this group at http://groups.google.com/group/eclim-user.
> For more options, visit https://groups.google.com/groups/opt_out.

--
eric

Martin T.

unread,
Feb 21, 2014, 8:16:54 AM2/21/14
to eclim...@googlegroups.com
My .classpath file had this entry

    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>

After changing it to


    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

:Validate does not find any errors anymore

I also had to switch from neocomplcache to neocomplete to enable omnifunc:

let g:EclimCompletionMethod = 'omnifunc'

if !exists('g:neocomplete#force_omni_input_pattern')
  let g:neocomplete#force_omni_input_pattern = {}
endif
let g:neocomplete#force_omni_input_pattern.java = '\k\.\k*'

it now works even with spf13

Eric Van Dewoestine

unread,
Feb 21, 2014, 9:54:31 AM2/21/14
to eclim...@googlegroups.com
On 2014-02-21 14:16:54, Martin T. wrote:
> My .classpath file had this entry
>
> <classpathentry kind="con"
> path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
>
> After changing it to
>
> <classpathentry kind="con"
> path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
>
> :Validate does not find any errors anymore
>
> I also had to switch from neocomplcache to neocomplete to enable omnifunc:
>
> let g:EclimCompletionMethod = 'omnifunc'
>
> if !exists('g:neocomplete#force_omni_input_pattern')
> let g:neocomplete#force_omni_input_pattern = {}
> endif
> let g:neocomplete#force_omni_input_pattern.java = '\k\.\k*'
>
> it now works even with spf13 <https://github.com/spf13/spf13-vim>

Awesome! Thank you for your patience and hopefully you find eclim
worth the effort.

Felix Dietze

unread,
Sep 17, 2014, 1:12:03 PM9/17/14
to eclim...@googlegroups.com
> :verbose set omnifunc?
>   omnifunc=
>         Last set
> by~/.vimviews/=+cygdrive=+e=+workspace=+CAMM=+CAMM=+amm-plugin=+src=+main=+java=+com=+rwe=+amm=+plugin=+sender=+MessageSenderFactory.java=

That's an odd one that I've never seen before.


I had the same problem. For me automatic view saving overwrote the omnifunc option. I solved it by not saving the options:

set viewoptions=cursor,folds,slash,unix
 
Reply all
Reply to author
Forward
0 new messages