Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

com.sun.mirror.apt API

Tags:

java

I'm new to Java and I am getting an error via Eclipse on the following lines:

import com.sun.mirror.apt.AnnotationProcessorFactory;
import com.sun.mirror.apt.AnnotationProcessor;
import com.sun.mirror.apt.AnnotationProcessorEnvironment;

The error is "The import com.sun.mirror cannot be resolved".

How do I fix this error?

like image 405
Blade3 Avatar asked Dec 17 '22 00:12

Blade3


1 Answers

To the point: just put it in the classpath (buildpath, in Eclipse). You can download it here.

However, this use is not really recommended. Rather use the standard API classes and methods in the javax.annotation.processing API which are already inside the standard Java SE API. It will "behind the scenes" use the right classes for the desired tasks.

like image 102
BalusC Avatar answered Dec 24 '22 00:12

BalusC