| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]"> |
| <title> |
| Java Compiler |
| </title> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script> |
| </head> |
| <body> |
| <h1> |
| Compiler |
| </h1> |
| <p>The |
| <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.CompliancePreferencePage)")'> |
| <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Java Compiler preference page"> |
| <b>Java > Compiler</b></a> preference page |
| lets you configure the various settings related to compiling of Java source code and class file generation.</p> |
| <h3>JDK Compliance</h3> |
| <table border="1" cellspacing="0" cellpadding="5" width="100%"> |
| <tr> |
| <th> |
| <p> |
| Option |
| </p> |
| </th> |
| <th> |
| <p> |
| Description |
| </p> |
| </th> |
| <th> |
| <p> |
| Default |
| </p> |
| </th> |
| </tr> |
| <tr> |
| <td valign="top"> |
| <p> |
| Compiler compliance level |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| Specifies the compiler compliance level. |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| 1.4 |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"> |
| <p> |
| Use default compliance settings |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| If enabled, the default compliance settings for the compiler compliance level are applied. |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| On |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"> |
| <p> |
| Generated class files compatibility |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| Specifies the generated class file compatibility. |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| 1.2 |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"> |
| <p> |
| Source compatibility |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| Specifies the compatibility of the accepted source code. |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| 1.3 |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"> |
| <p> |
| Disallow identifiers called 'assert' |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| When enabled, the compiler will issue an error or a warning whenever 'assert' is used as an identifier (reserved keyword in J2SE 1.4). |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| Warning |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"> |
| <p> |
| Disallow identifiers called 'enum' |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| When enabled, the compiler will issue an error or a warning whenever 'enum' is used as an identifier (reserved keyword in J2SE 5.0). |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| Warning |
| </p> |
| </td> |
| </tr> |
| </table> |
| <h3>Classfile generation</h3> |
| <table border="1" cellspacing="0" cellpadding="5" width="100%"> |
| <tr> |
| <td valign="top"> |
| <p> |
| Add variable attributes to generated class files |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| If enabled, variable attributes are added to the class file. This will enable local variable names to be displayed in the debugger (in places where variables are |
| definitely assigned) The resulting .class file is then bigger. |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| On |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"> |
| <p> |
| Add line number attributes to generated class files |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| If enabled, line number information is added to the class file. This will enable source code highlighting in the debugger. |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| On |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"> |
| <p> |
| Add source file name to generated class file |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| If enabled, the source file name is added to the class file. This will enable the debugger to present the corresponding source code. |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| On |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"> |
| <p> |
| Preserve unused local variables |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| If enabled, unused local variables (i.e. never read) are not stripped from the class file. If stripped this potentially alters debugging. |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| On |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"> |
| <p> |
| Inline finally blocks |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| If enabled, finally blocks are inlined in the generated class files. This positively affects performance, but may result in larger class files. |
| </p> |
| </td> |
| <td valign="top"> |
| <p> |
| Off |
| </p> |
| </td> |
| </tr> |
| </table> |
| <p> |
| <img src="../images/ngrelc.png" alt="Related concepts" border="0" ></p> |
| <p> |
| <a href="../concepts/concepts-4.htm">Java builder</a> |
| </p> |
| <p> |
| <img src="../images/ngrelt.png" alt="Related tasks" border="0" ></p> |
| <p> |
| <a href="../tasks/tasks-JREs.htm">Working with JREs</a> |
| </p> |
| <p> |
| <img border="0" src="../images/ngrelr.png" alt="Related reference"></p> |
| <p> |
| <a href="../reference/ref-15.htm">Classpath Variables preferences</a><br> |
| <a href="../reference/ref-123.htm">Java Build Path properties</a><br> |
| <a href="../reference/preferences/java/compiler/ref-preferences-building.htm">Building preference page</a><br> |
| <a href="../reference/preferences/java/compiler/ref-preferences-errors-warnings.htm">Errors/Warnings preference page</a><br> |
| <a href="../reference/preferences/java/compiler/ref-preferences-javadoc.htm">Javadoc preference page</a><br> |
| <a href="../reference/ref-preferences-task-tags.htm">Task Tags preference page</a> |
| </p> |
| </body> |
| </html> |
| |