Reputation: 2818
I have recently migrated to Eclipse from another IDE.
I use an ANT file to compile a legacy Java webapp I am taking care of.
Here is a snipped of the specifications for compiling it in my build.xml:
<target name="build" description="Compile main source tree java files">
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}" source="${javaversion}" target="${javaversion}" debug="true"
deprecation="false" optimize="false" failonerror="true"
fork="yes" executable="${appserver.jdk}">
<src path="${src.dir}"/>
<classpath refid="master-classpath"/>
</javac>
</target>
When I run just the build.xml I get just 2 warnings ( about some deprecated libraries ).
However, when I open the project up in Eclipse, I got over 100 warnings about interesting things such as blocks of dead code, better declaring collections, etc?
Where do all of these "new" warnings come from in Eclipse? Is it part of the JDT or a third party Java tool that any IDE ( or wo/man with a command prompt and a JDK installation ) can use?
Upvotes: 0
Views: 103
Reputation: 21
In Eclipse, go to Window -> Preferences. In there, drill down to Java -> Compiler -> Errors/Warnings. That is all the settings for what eclipse will flag as warnings and errors in addition to Java compile errors.
Upvotes: 0
Reputation: 44808
Eclipse uses its own compiler:
An incremental Java compiler. Implemented as an Eclipse builder, it is based on technology evolved from VisualAge for Java compiler. In particular, it allows to run and debug code which still contains unresolved errors.
You can use it from the command line as a batch compiler if you were so inclined.
Upvotes: 1