This package will lint your opened .java
-files on save, using javac.
- 1.9.4 - Hotfixes exception after empty stderr-output (see issue 96).
- 1.9.2|3 - Fixes faulty handling of symbolic links in the files path (see issue 94).
- 1.9.1 - Hotfixes a bug introduced by 1.9.0.
- 1.9.0 - Adds generic support for localized javac output, supports chinese (see issue 36).
- 2.0.0 - Complete rewrite of linter-javac (see issue 76).
Ensure a working JDK is available in your environment (see FAQ) then enter the following on your command line:
apm install linter-javac
Or Atom ➔ Preferences... ➔ Packages ➔ Search for "linter-javac".
You can configure linter-javac by using the GUI (recommended - the GUI offers a description and valid defaults) or by editing your ~/.atom/config.cson
(or Atom ➔ Open Your Config):
"linter-javac":
javaExecutablePath: "javac"
additionalClasspaths: "C:\Users\JohnDoe"
additionalJavacOptions: "-verbose -d C:\java-class-cache"
classpathFilename: ".acme-inc-classpaths"
javacArgsFilename: "acme-inc-argfile"
Example-Configuration, see our Wiki or the config-GUI for further information.
To configure linter-javac on a per project-base, we currently encourage you using the project-manager package.
The currently implemented
.classpath
-file format conflicts with the Eclipse-based file format. Therefore this implementation will be replaced in the far future.
We are aware that configuring classpath-information is the most important (and annoying) issue in linting source-files right - we are working hard to make our planned improvement imperceptible for you. We will keep you informed.
It is strongly recommended that you You may configure your classpath via a so called classpath-file which by default is named .classpath
(you can change the filename in the Atom-preferences).
The linter starts searching for your classpath-file in the directory where the source file resides which get's linted. If there is no matching classpath-file the search is continued wandering the file-tree up, until a classpath-file is found or the project-folder would be left.
You may place any directories classpath-file, delimited by your platform-specific path-dlimiter (:
/;
):
.:./lib/junit.jar
A linter configured by the above example will execute javac
in the directory where the classpath-file resides, so that relative paths will be resolved in dependency to the classpath-file-position.
Please take a look into our FAQs at our wiki.
Yes please! Give us feedback, file bugs or just help us coding - join us on https://github.com/AtomLinter/linter-javac/issues and leave a note!
💝