Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

(v3.6.0) Java: javac

LCD 47 edited this page Jan 19, 2015 · 1 revision

Maintainers:

Commands

The following commands become available after your run javac checker at least once:

SyntasticJavacEditClasspath
This opens a buffer in a separate window. In this buffer you can specify a classpath (each path on a separate line) or using : characters (or ; on Windows)
SyntasticJavacEditConfig
This option is only relevant if you use g:syntastic_java_javac_config_file_enabled. It opens a buffer where you can specify your javac config settings which will be saved into .syntastic_javac_config file. Settings are specified in VimL language

Checker options

g:syntastic_java_javac_executable (Default: 'javac')
Java compiler executable used for checking file
g:syntastic_java_maven_executable (Default: 'mvn')
Maven executable used for loading maven project classpath
g:syntastic_java_javac_options (Default: '-Xlint')
javac options
g:syntastic_java_javac_classpath (Default: '')
javac classpath; it can be changed by running the SyntasticJavacEditClasspath command
g:syntastic_java_javac_delete_output (Default: 1)
if set, the checker will delete the .class file created by javac
g:syntastic_java_javac_autoload_maven_classpath (Default: 1)
if enabled, and a file pom.xml is found in the current working directory, maven is used to load Maven project's classpath
g:syntastic_java_javac_config_file_enabled (Default: 0)
if enabled, a file .syntastic_javac_config containing the classpath is created in the current working directory; you can edit this file using the SyntasticJavacEditClasspath command; the change will take effect next time you run the checker in the current directory
g:syntastic_java_javac_config_file (Default: '.syntastic_javac_config')
name of the configuration file used by javac (you probably don't need to change this)
g:syntastic_java_javac_custom_classpath_command (Default: '')
when specified will execute a custom command to get a classpath; the command classpath output can be in traditional Java form, or specified on separate lines

Using Ant

When using ant, you can have custom build target (named for example 'path') that will output your project's classpath. You can then use :SyntasticJavacEditConfig and add the following line to use it with javac checker:

let g:syntastic_java_javac_custom_classpath_command =
    \ "ant -q path | grep echo | cut -f2- -d] | tr -d ' ' | tr ':' '\n'"
Clone this wiki locally