Repository: incubator-netbeans-website
Updated Branches:
  refs/heads/asf-site dadd1a867 -> 5209d6525


quick start test commit

Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-website/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-website/commit/5209d652
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-website/tree/5209d652
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-website/diff/5209d652

Branch: refs/heads/asf-site
Commit: 5209d6525f53ece8edee75d52a78f14d09c1eb42
Parents: dadd1a8
Author: gwieleng <[email protected]>
Authored: Tue May 2 14:45:16 2017 +0200
Committer: gwieleng <[email protected]>
Committed: Tue May 2 14:45:16 2017 +0200

----------------------------------------------------------------------
 content/kb/docs/java/quickstart.html | 244 ++++++++++++++++++++++++++++++
 1 file changed, 244 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-netbeans-website/blob/5209d652/content/kb/docs/java/quickstart.html
----------------------------------------------------------------------
diff --git a/content/kb/docs/java/quickstart.html 
b/content/kb/docs/java/quickstart.html
new file mode 100644
index 0000000..d3e0354
--- /dev/null
+++ b/content/kb/docs/java/quickstart.html
@@ -0,0 +1,244 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+
+<!--
+Copyright (c) 2009 - 2014, Oracle and/or its affiliates. All rights reserved.
+-->
+
+<html>
+    <head>
+        <title>NetBeans IDE Java Quick Start Tutorial</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
+        <link rel="stylesheet" type="text/css" href="../../../netbeans.css">
+        <meta name="keywords" content="NETBEANS, TUTORIAL, GUIDE, USER, 
DOCUMENTATION">
+        <meta name="description" content="A very simple and quick introduction 
to the NetBeans IDE workflow by walking you through the creation of a simple 
Hello World Java console application." >
+    </head>
+
+    <body>
+
+        <h1>NetBeans IDE Java Quick Start Tutorial</h1>
+
+        <p>Welcome to NetBeans IDE!</p>
+        <p>This tutorial provides a very simple and quick introduction to the 
NetBeans IDE workflow by walking you through the creation of a
+            simple &quot;Hello World&quot; Java console application. Once you 
are done with this tutorial, you will have a general knowledge of how
+        to create and run applications in the IDE.</p>
+        <p>This tutorial takes less than 10 minutes to complete.</p>
+        <p>After you finish this tutorial, you can move on to the learning 
trails,
+            which are linked from the <a 
href="../../index.html">Documentation, Training &amp; Support</a> page.
+            The learning trails provide comprehensive tutorials that highlight 
a wider range of
+            IDE features and programming techniques for a variety of 
application types. If you do not want to do a &quot;Hello World&quot; 
application,
+            you can skip this tutorial and jump straight to the learning 
trails.
+        </p>
+        <p><b>Contents</b></p>
+        <img  
src="../../../images_www/articles/73/netbeans-stamp-80-74-73.png" class="stamp" 
alt="Content on this page applies to NetBeans IDE 7.2 and later" title="Content 
on this page applies to the NetBeans IDE 7.2 and later">
+        <ul class="toc">
+            <li><a href="#setup" title="Setting Up the Project">Setting Up the 
Project</a></li>
+            <li><a href="#code" title="Adding Code to the Generated Source 
File">Adding Code to the Generated Source File</a></li>
+            <li><a href="#run" title="Compiling and Running the 
Program">Compiling and Running the Application</a></li>
+            <li><a href="#build" title="Building and Deploying the 
Application">Building and Deploying the Application</a></li>
+            <li><a href="#nextsteps" title="Next Steps">Next Steps</a></li>
+        </ul>
+
+        <p><b>To complete this tutorial, you need the following software and 
resources.</b></p>
+
+        <table>
+            <tbody>
+                <tr>
+                    <th class="tblheader" scope="col">Software or Resource</th>
+                    <th class="tblheader" scope="col">Version Required</th>
+                </tr>
+                <tr>
+                    <td class="tbltd1"><a 
href="https://netbeans.org/downloads/index.html";>NetBeans IDE</a></td>
+                    <td class="tbltd1">version 7.2,  7.3, 7.4, or 8.0</td>
+                </tr>
+                <tr>
+                    <td class="tbltd1"><a 
href="http://java.sun.com/javase/downloads/index.jsp";>Java Development Kit 
(JDK)</a></td>
+                    <td class="tbltd1">version 6, 7, or 8</td>
+                </tr>
+
+            </tbody>
+        </table>
+
+        <h2>Setting Up the Project<a name="setup"></a></h2>
+        <p>To create an IDE project:</p>
+
+        <ol>
+            <li>Start NetBeans IDE.</li>
+            <li>In the IDE, choose File &gt; New Project, as shown in the 
figure below.
+                <p class="align-center"><img 
src="../../../images_www/articles/72/java/quickstart/new-proj.png" 
alt="NetBeans IDE with the File &gt; New Project menu item selected." 
class="margin-around"></p>
+          </li>
+            <li>In the New Project wizard, expand the Java category and select 
Java Application as shown in the figure below. Then click Next.
+               
+                          <p class="align-center">
+               <a 
href="../../../images_www/articles/72/java/quickstart/proj-wizard.png" 
rel="lytebox"
+                       title="New Project wizard: Choose Project">
+                                          <img 
src="../../../images_www/articles/72/java/quickstart/proj-wizard-small.png"
+                     alt="New Project wizard: Choose Project" border=1></a></p>
+            </li>
+            <li>In the Name and Location page of the wizard, do the following 
(as shown in the figure below):
+
+                <ul>
+                    <li>In the Project Name field, type 
<code>HelloWorldApp</code>.</li>
+                    <li>Leave the Use Dedicated Folder for Storing Libraries 
checkbox unselected.</li>
+                    <li>In the Create Main Class field, type 
<code>helloworldapp.HelloWorldApp</code>.</li>
+                    
+                </ul>
+                
+                               <p class="align-center"><a 
href="../../../images_www/articles/72/java/quickstart/proj-wizard2.png" 
rel="lytebox"
+                       title="New Project wizard: Name and Location">
+                                          <img 
src="../../../images_www/articles/72/java/quickstart/proj-wizard2-small.png"
+                     alt="New Project wizard: Name and Location" 
border=1></a></p>
+            </li>
+            <li>Click Finish.</li>
+        </ol>
+        <p>The project is created and opened in the IDE. You should see the 
following components:</p>
+        <ul>
+            <li>The Projects window, which contains a tree view of the 
components of the project,
+                including source files, libraries that your code depends on, 
and so on.
+            </li>
+            <li>The Source Editor window with a file called 
<code>HelloWorldApp</code> open.
+            </li>
+            <li>The Navigator window, which you can use to quickly navigate 
between
+            elements within the selected class.</li>
+            
+        </ul>
+        
+               <p class="align-center"> <a 
href="../../../images_www/articles/72/java/quickstart/proj-opened.png" 
rel="lytebox"
+                       title="NetBeans IDE with the HelloWorldApp project 
open.">
+                                          <img 
src="../../../images_www/articles/72/java/quickstart/proj-opened-small.png"
+                     alt="NetBeans IDE with the HelloWorldApp project open." 
border=1></a></p>
+        <h2><a name="code"></a>Adding Code to the Generated Source File
+        </h2>
+        <p>Because you have left the Create Main Class checkbox selected in the
+        New Project wizard, the IDE has created a skeleton main class for you.
+        You can add the &quot;Hello World!&quot; message to the
+        skeleton code by replacing the line:</p>
+
+        <pre class="examplecode">
+            // TODO code application logic here
+        </pre>
+
+        with the line:
+
+        <pre class="examplecode">
+            System.out.println(&quot;Hello World!&quot;);
+        </pre>
+
+        <p>Save the change by choosing File &gt; Save.</p>
+
+        <p>The file should look something like the following code sample.</p>
+        <pre class="examplecode">
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package helloworldapp;
+
+/**
+ *
+ * @author &lt;your name&gt;
+ */
+public class HelloWorldApp {
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String[] args) {
+            System.out.println(&quot;Hello World!&quot;);
+    }
+
+}
+
+        </pre>
+
+        <a name="run"></a><h2>Compiling and Running the Program</h2>
+        <p>Because of the IDE's Compile on Save feature, you do not have to 
manually compile
+            your project in order to run it in the IDE. When you save a Java 
source file, the IDE
+        automatically compiles it.</p>
+        <p class="notes">The Compile on Save feature can be turned off in the 
Project Properties window. Right-click your project, select Properties. In the 
Properties window, choose the Compiling tab. The Compile on Save checkbox is 
right at the top. Note that in the Project Properties window you can configure 
numerous settings for your project: project libraries, packaging, building, 
running, etc. </p>
+        <p><b>To run the program:</b></p>
+        <ul>
+            <li>Choose Run &gt; Run Project.</li>
+        </ul>
+
+        <p>The next figure shows what you should now see.</p>
+        <p class="align-center"><img 
src="../../../images_www/articles/72/java/quickstart/run-output.png" ALT="The 
program prints Hello World! to the Output window (along with other output from 
the build script)." class="margin-around"></p>
+        <p>
+            Congratulations! Your program works!
+        </p>
+
+        <p>If there are compilation errors, they are marked with red glyphs
+            in the left and right margins of the Source Editor. The glyphs in 
the left
+            margin indicate errors for the corresponding lines. The glyphs in 
the right
+            margin show all of the areas of the file that have errors, 
including errors
+            in lines that are not visible. You can mouse over an error mark to 
get a
+            description of the error. You can click a glyph in the right 
margin to jump
+            to the line with the error.
+        </p>
+
+        <a name="build"></a>
+        <h2>Building and Deploying the Application </h2>
+
+        <p>Once you have written and test run your application, you can
+            use the Clean and Build command to build your application for 
deployment.
+            When you use the Clean and Build command, the
+         IDE runs a build script that performs the following tasks:</p>
+        <ul>
+            <li>Deletes any previously compiled files and
+            other build outputs.</li>
+            <li>Recompiles the application and builds a JAR file
+            containing the compiled files.</li>
+        </ul>
+        <p><b>To build your application:</b></p>
+        <ul>
+            <li>Choose Run &gt; Clean and Build Project.  </li>
+        </ul>
+
+        <p>You can view the build outputs by opening the Files window and 
expanding
+        the <tt>HelloWorldApp</tt> node. The compiled bytecode file 
<code>HelloWorldApp.class</code> is within the 
<code>build/classes/helloworldapp</code> subnode.
+          A deployable JAR file that contains the 
<code>HelloWorldApp.class</code> is within the <code>dist</code> node.</p>
+        <p class="align-center"><img 
src="../../../images_www/articles/72/java/quickstart/files-window.png"
+         alt="Image showing the Files window with the nodes for the 
HelloWorldApp expanded to show the contents of the build and dist subnodes." 
class="margin-around"></p>
+<p>You now know how to accomplish some of the most common programming tasks in 
the IDE.</p>
+<p>For information on how to run the application from the command line, see 
the <a href="javase-deploy.html#startapp" target="_blank">Starting Your Java 
Application</a> chapter of the Packaging and Distributing Java Applications 
tutorial. </p>
+
+        <div class="feedback-box"><a 
href="/about/contact_form.html?to=3&subject=Feedback:%20NetBeans%20IDE%20Java%20Quick%20Start%20Tutorial">Send
 Feedback on This Tutorial</a></div>
+       <br style="clear:both;">
+        <h2><a name="nextsteps"></a>See Also</h2>
+      
+        <p>For information on creating and working with standard and free-form 
Java
+projects, see <a 
href="http://www.oracle.com/pls/topic/lookup?ctx=nb8000&amp;id=NBDAG366";>Creating
 Java Projects</a> in  <i>Developing Applications with NetBeans IDE</i>.</p>
+        <p>To learn more about the IDE workflow for developing Java 
applications,
+        including classpath management,
+        see <a href="javase-intro.html">Developing General Java 
Applications</a>.</p>
+       
+               <p>For detailed instructions on how to compile and run a simple 
&quot;Hello World!&quot; application on your operating system, see the <a 
href="http://docs.oracle.com/javase/tutorial/getStarted/cupojava/index.html"; 
target="_blank">The &quot;Hello World&quot; Application</a> lesson of the Java 
Tutorials.</p>
+               
+        <p>To find information specific to the kind of applications you are 
developing, use the NetBeans IDE
+            learning trail for that type of application. Each learning trail 
contains a series of tutorials and
+            guides that range in scope from basic to advanced. The following
+        learning trails are available:</p>
+        <table width="100%">
+            <tr>
+                <td>
+                    <ul>
+                        <li><a href="../../trails/java-se.html">General Java 
Development </a></li>
+                        <li><a href="../../trails/tools.html">Integration with 
External Tools and Services </a></li>
+                        <li><a href="../../trails/matisse.html">Java GUI 
Applications</a></li>
+                        <li><a href="../../trails/web.html">Web Services 
Applications</a></li>
+                        <li><a href="../../trails/java-ee.html">Java EE &amp; 
Java Web Applications</a></li>
+                    </ul>
+                </td>
+                <td>
+                    <ul>
+                        <li><a href="../../trails/php.html">PHP and HTML5 
Applications</a></li>
+                        <li><a href="../../trails/platform.html">NetBeans 
Platform and Module Development</a></li>
+                        <li><a href="../../trails/cnd.html">C/C++ 
Applications</a></li>
+                        <li><a href="../../trails/mobility.html">Mobile 
Applications</a></li>
+                    </ul>
+              </td>
+            </tr>
+        </table>
+
+    </body>
+</html>

Reply via email to