Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5946677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:51:24+00:00 2026-05-22T16:51:24+00:00

After running javac with some processor selected, I get the proper source files generated.

  • 0

After running javac with some processor selected, I get the proper source files generated. Unfortunately, every time I rerun the process I see warnings about duplicate class: com..... (one being processed).

This does not cause the ant task to fail, so it’s not a real problem, but I’d be glad to get rid of the message. How can I do that?

I’m basically running:

JavaFileObject jfo = environment.getFiler().createSourceFile(somepackage + "." + myType.getSimpleName() + "Generated", myType);
Writer writer = jfo.openWriter();
generateSomeOtherClass(writer, myTypeElement);
writer.close();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:51:24+00:00Added an answer on May 22, 2026 at 4:51 pm

    I wonder if this is related to this bug in javac that’s supposed to be fixed in Java 7? The compiler spews its errors early before it runs the annotation processors which ultimately make the errors not-really-errors and everything comes out in the end.

    We’ve actually written a custom Ant task that extends the normal Ant javac task, overrides the various log() methods and attempts to silence errors that are likely to be spurious once all the annotation processing is complete. I’d post the code, but frankly it’s very ugly, and I’d rather not unleash it on the world… Lots of big gnarly regexp’s, and it’s horribly brittle…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After running optical char recognition on some images, I get approximate text. Often the
After running for a long time, I get more and more holes in the
I have some Java code that is throwing out of memory exceptions after running
After running some usability tests, I found that participants opened a jQuery Lightbox to
After running a model in fortran (95) I end up with some result arrays
The following output appears after running some rake tasks: Loaded suite /usr/bin/rake Started Finished
Is there an easy way to get a conflict summary after running a cvs
I'm use nosetests to run some tests. However, after the tests have finished running,
In a nutshell: my JBoss instance is running ok, but after some days it's
I'm running into some curious behavior that I haven't seen before with javac and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.