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 7936871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:20:45+00:00 2026-06-03T22:20:45+00:00

In case of compilation errors, ant javac task will not compile all classes which

  • 0

In case of compilation errors, ant javac task will not compile all classes which can be compiled. It seems that the javac task (or the compiler itself) just stops as soon as the first error is encountered.

The failonerror property does not have any impact to this behavior.
I’m not setting the compile attribute (hence, the Oracle JDK’s compiler is used).

Is it possible to compile as most classes as possible in case of compilation errors?
(preferably not relying on any specific compiler)

One use case for this is during development:
Imagine that you’re implementing some new functionality but you’re not finished and compile errors remain.
In the meanwhile you need to fix some other bug and to ensure nothing is broken you want to execute the standard test suites which are invoked by an ant task in the project workspace of your IDE. The ant task tries to compile all classes/test classes but fails due to compile errors in the class you’re just developing.

It would be very helpful to tell ant/javac to not fail on compile errors in order to be able to execute as most test cases as possible.

  • 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-03T22:20:46+00:00Added an answer on June 3, 2026 at 10:20 pm

    That has nothing to do with ant, it’s javac that will stop on error and never give you any class file.
    The failonerror property just say if the build should continue or stop if compilation sends back an error.

    Since 1.3 : http://docs.oracle.com/javase/1.3/docs/tooldocs/tools-changes.html

    “When the new 1.3 compiler detects an error in a source file during a compilation, it continues to parse the remaining source files and attempts to identify any further errors that they may contain. Code generation is completely suppressed for the remainder of the compilation, however, and no class files will be generated, even for compilation units that contain no errors.”

    You may want to use some other compilers like jikes. But really, who would want partially compiled classes to be run ?

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

Sidebar

Related Questions

I have the following oracle statement which is giving compilation errors. v_percent_deceased_households := CASE
I'm trying to compile X11R6-7.0 under Ubuntu maverick and got some weird compilation errors
I would like to write an OCaml module having a compile function which will
Compilation errors with templates are often obscure and not easily decipherable unless one is
I've downloaded the source code, converted the solution to VS10 format, fixed all compilation
When I hit Compile Project (SHIFT+F6) in Visual Studio 2008, Visual Studio always seems
Class A can implement multiple interfaces. What I do not understand is what happens
i have no compilation errors, but it crashes on run-time, that's my relevant code,
I am getting a compilation error in this block of code: switch(event) { case
I not family with PL/SQL. Can anyone explain why I can't do the following?

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.