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

  • SEARCH
  • Home
  • 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 8676711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:16:03+00:00 2026-06-12T20:16:03+00:00

Because a single Java file can compile into any number of class files, is

  • 0

Because a single Java file can compile into any number of class files, is there some way from the compiler API to find out which class files were generated? It’s outputting to a directory that may have other files in it, so I can’t just look at that.

  • 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-06-12T20:16:04+00:00Added an answer on June 12, 2026 at 8:16 pm

    I figured out something that appears to work. The *FileManager has callbacks to get the locations for things, including things for output. You can wrap it using the ForwardingJavaFileManager, override, and store the values from the calls.

    final List<String> classFiles = new ArrayList<>();
    StandardJavaFileManager inner = compiler.getStandardFileManager(null, null, null);
    JavaFileManager fileManager = new ForwardingJavaFileManager(inner) {
        @Override
        public JavaFileObject getJavaFileForOutput(Location location, String className,
                    JavaFileObject.Kind kind, FileObject sibling) throws IOException {
            JavaFileObject o = super.getJavaFileForOutput(location, className, kind, sibling);
            classFiles.add(o.getName());
            return o;
        }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Because data from file look like this: line 1 is name (first last), next
Because I've made .cpp files and then transferred them into .h files, the only
How can I get mcc to recognize imports from user-provided Java libraries, or to
I need html - java script / jquery charts using single file. What do
I am developing in python a file class that can read and write a
I'm working on some Java code in eclipse. Code is contained in a single
I have some strings in Java (originally from an Excel sheet) that I presume
I need to know if there is any embedded DBMS (preferably in Java and
Task 1: Read each row from one csv file into one seprate txt file.
I need single-producer, single-consumer FIFO query because I need to process messages in the

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.