I need to work with com.sun.tools.javac
classes that are private and are not visible neither during compile nor run time.
I use:
- JDK 11.0.15
- Maven build tool
- Intellij IDEA
My current state is that my imports are red-highlghited and compilation fails.
My class I want to use sun tools inside (sorry for the pic instead of code, my class is 2000+ lines length, for now I only care about availability of tools in my class):
pom.xml:
...
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
I need to be able to have these classes available as I "type", during mvn compile
and in runtime.
com.sun
packages I'd like to have:
- com.sun.tools.javac.code
- com.sun.tools.javac.comp
- com.sun.tools.javac.file
- com.sun.tools.javac.main
- com.sun.tools.javac.model
- com.sun.tools.javac.parser
- com.sun.tools.javac.processing
- com.sun.tools.javac.tree
- com.sun.tools.javac.util
Thank you in advance!