Skip to content
/ jcheck Public

A fast Java syntax checker for code editors like vim

License

mahdix/jcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jcheck

A fast syntax checker for java source code files

This is a small utility which creates an in-memory java compiler which can be invoked through HTTP commands to check a Java source file in a Maven-based project and get compiler errors.

In order to use this utility you will need to compile and run it first.

javac JCompiler.java
java -cp . JCompiler &

You need to append & to the command so that the utility will be running in background.

To invoke the checker you need to call it via curl (If you dont't have curl installed, for god's sake please install it ;-) ).

curl http://localhost:8000/check?/srv/newzrobot/server/src/main/java/File1.java

It will return list of errors + time taken to compile.

As this utility will be caching compiler and file manager it will be much faster that running javac from command line. Useful for cases during development that you need instant feedback.

NOTE: This utility relies on a valid CLASSPATH defined in bash environment.

To use this utility in vim more easily, you can add this to your .vimrc:

:command! JC !curl http://localhost:8000/check?%:p

After that you can enter JC command in vim's command prompt and view compiler errors.

About

A fast Java syntax checker for code editors like vim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages