vim-javacomplete2

Java 9 support

Considerable time passed after java version 9 was released. And as it turned out, my plugin for vim stopped working with this java version.

Problem

«Java9» is known for many changes, one of which is project Jigsaw. Packages distribution by modules, which will allow build lightweight java running enviroment, that is useful for embedded platforms.

The issue with my plugin was in that all java base classes now keeping in modules under the jmod directory in jdk root. But in past releases it was located in libs directory using simple jar files.

Another one, in «Java9» extensions and enviroment variable java.ext.dirs have been removed, that led to NPE.

Solution

Solution turned up to be simple. In archive scanning process, besides jar and zip, I added jmod files as well.

And I added check for null of java.ext.dirs variable.

Link to commit