1 Java path errors with Intellisense for Vim for Windows

Feb 15th, 2006   8:11 pm

I’ve been using Vim Intellisense for a while now, and while it’s no IDE replacement, it does make life easier in Vim. I’m reasonably sure I could be more productive in Vim, but I haven’t had the time to explore for other options/enhancements.

I noticed I was getting path errors when I started a new Vim window, like:
Cannot find jvm.dll in the location specified by your g\:intellisense_jvm_dir
Hit ENTER or type command to continue

Intellisense uses your JAVA_HOME variable to deduce where jvm.dll, part of the Java Runtime (JRE) installation, is located. I haven’t spent too much time tracking it down, but I’ve a feeling the error has something to do with spaces in my PATH variable (e.g. “c:\Program Files\program1” ).

So the quick-fix is to edit your c:\vim\vimfiles\plugin\intellisense.vim file (adjust for your installation path!). Depending on your version of Intellisense (mine is v1.4.1), line 380 reads:
let $PATH = $PATH . ';' . g:\intellisense_jvm_dir
, but I want to ignore the rest of the path, including the components that have spaces, as there’s nothing in there I need for my Vim / Intellisense session. So I just changed the line to:
let $PATH = g:\intellisense_jvm_dir
which just includes the jvm.dll directory in the PATH, nothing else.

Next problem! You might use the JavaDoc feature of Intellisense (where it displays any JavaDoc info beside the method description popup). If you do, you’ll need to have the Java API docs in your JAVA_HOME\docs\api folder (which is probably good practice anyway). Otherwise you’ll get an error like:
The location specified by g:\intellisense_javaapi_dir in your .vimrc does not exist.
Hit ENTER or type command to continue

. So just extract the API zip file (from java.sun.com) into that folder (e.g. c:\java\docs\api), not forgetting that the ZIP file already has the docs\api folder structure. That should solve that error.

Comments:

Author

cgarvey
Mar 4th, 2006   8:45 am

I just edited my post to actually use the workaround I'd just harped on about for so long!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

css.php