1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
4
* Use is subject to license terms.
8
<title>Compiling a Single File</title>
9
<link rel="StyleSheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
12
<h2>Compiling a Single File</h2>
13
<p> <small><a href="#seealso">See Also</a> </small>
15
<li>Select the file in the Projects window, Files window, or Source Editor and
16
choose Build > Compile File (F9). </li>
19
<li> If you are using a <object classid="java:com.sun.java.help.impl.JHSecondaryViewer">
20
<param name="content" value="../project/csh/glossary_freeform.html">
21
<param name="viewerActivator" value="javax.help.LinkLabel">
22
<param name="viewerStyle" value="javax.help.Popup">
23
<param name="viewerSize" value="400,160">
24
<param name="text" value="free-form project">
25
<param name="textFontSize" value="medium">
26
<param name="textFontFamily" value="SansSerif">
27
<param name="textFontStyle" value="italic">
28
<param name="textFontWeight" value="bold">
29
<param name="textColor" value="blue">
30
</object>, you need an Ant target for this command. The IDE offers to
31
generate a target the first time you choose the command. In the generated target,
32
you need to specify the directory where to put the compiled class. You can do so by
33
specifying a value for the <tt>build.classes.dir</tt> property in the generated target.
34
For example, you might add the following line to the line above the
35
<tt><target name="compile-selected-files-in-src"></tt> entry:
36
<pre><property name="build.classes.dir" value="build"/></pre>
37
<p>Alternatively, you can replace the value of the provided <tt>build.classes.dir</tt>
38
or rewrite the target entirely.</p>
39
<p>For a full guide to configuring free-form projects,
42
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
43
<param name="content" value="http://www.netbeans.org/kb/55/freeform-config.html">
44
<param name="text" value="<html><u>http://www.netbeans.org/kb/55/freeform-config.html</u></html>">
45
<param name="textFontSize" value="medium">
46
<param name="textColor" value="blue">
52
<dt><a name="seealso">See Also</a></dt>
53
<dd><a href="comp_quickref.html">Building Tasks: Quick Reference</a></dd>
54
<dd><a href="comp_project.html">Building a Project</a></dd>
55
<dd><a href="comp_jar.html">Building a JAR File</a></dd>
56
<dd><a href="comp_classpath.html">Managing the Classpath</a></dd>
57
<dd><a href="../project/proj_stand_customize.html">Customizing the Ant Build
64
<small><a href="../credits.html">Legal Notices</a></small>
66
<table border="0" cellpadding="20">
67
<tr><td> </td></tr>
68
<tr><td> </td></tr>
69
<tr><td> </td></tr>