com.sun.tools.javac.file.BaseFileObject

org.checkerframework compiler 1.9.0 OSS Sonatype


Missing this class?Import into your dependency manager

<dependency>
    <groupId>org.checkerframework</groupId>
    <artifactId>compiler</artifactId>
    <version>1.9.0</version>
</dependency>
libraryDependencies += "org.checkerframework" % "compiler" % "1.9.0"
compile group: 'org.checkerframework', name: 'compiler', version: '1.9.0'
<dependency org="org.eclipse.aether" name="aether-api" rev="1.1.0"/>

Download

Exception HelperAre you having an exception like the following?

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/file/BaseFileObject
    .
    .
    .
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.file.BaseFileObject
    .
    .
    .

To resolve the exception:

  1. Download this package from OSS Sonatype
    Or
    If you're using a dependency manager (Maven, SBT, Ivy, Gradle, etc.) copy and paste the respective snippet above into your project file. If you're using a dependency manager, that's all there is to resolving this exception.
  2. Include the downloaded package in your classpath when running Java. For example, if you're starting your program on the command line like so:
    java -jar my-jar.jar foo.bar.MainClass
    , you would add this package to the classpath like so:
    java -cp /path/to/downloaded/file/compiler-1.9.0.jar -jar my-jar.jar foo.bar.MainClass

Resolving the ArtifactYou may need to add this declaration to your project file to resolve the dependency for this class.

<repositories>
    <repository>
        <id>osssonatype</id>
        <name>OSS Sonatype</name>
        <url>https://repo1.maven.org/maven2/</url>
        <layout>default</layout>
    </repository>
<repositories/>
resolvers += "OSS Sonatype" at "https://repo1.maven.org/maven2/"
repositories {
    maven {
        url "https://repo1.maven.org/maven2/"
    }
}
<resolvers>
    <ibiblio name="OSS Sonatype" root="https://repo1.maven.org/maven2/" m2compatible="true" />
<resolvers/>
©2016 Samuel Nelson