We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>


Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

NetBeans IDE Java Quick Start Tutorial
Welcome to NetBeans IDE! This tutorial provides 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. Once you are done with this tutorial, you will have a general knowledge of how to create and run applications in the IDE. This tutorial takes less than 10 minutes to complete. After you finish this tutorial, you can move on to the learning trails, which are linked from the Documentation, Training & Support page. The learning trails provide comprehensive tutorials that highlight a wider range of IDE features and programming techniques for a variety of applicationtypes. If you do not want to do a "Hello World" application, you can skip this tutorial and jump straight to the learning trails. Contents 

To complete this tutorial, you need the following software and resources.

Software or Resource Version Required
NetBeans IDE version 7.2
Java Development Kit (JDK) version 6 or version 7

Setting Up the Project
To create an IDE project:

  1. Start NetBeans IDE.
  2. In the IDE, choose File > New Project (Ctrl-Shift-N), as shown in the figure below.
  3. In the New Project wizard, expand the Java category and select Java Application as shown in the figure below. Then click Next.
  4. In the Name and Location page of the wizard, do the following (as shown in the figure below):Click Finish.
    • In the Project Name field, type HelloWorldApp.
    • Leave the Use Dedicated Folder for Storing Libraries checkbox unselected.
    • In the Create Main Class field, type helloworldapp.HelloWorldApp.

The project is created and opened in the IDE. You should see the following components:

  • 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.
  • The Source Editor window with a file called HelloWorldApp open.
  • The Navigator window, which you can use to quickly navigate between elements within the selected class.

Adding Code to the Generated Source File
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 "Hello World!" message to the skeleton code by replacing the line:
            // TODO code application logic here         with the line:
            System.out.println("Hello World!");         Save the change by choosing File > Save. The file should look something like the following code sample.
/*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */  package helloworldapp;  /**  *  * @author <your name>  */ public class HelloWorldApp {      /**      * @param args the command line arguments      */     public static void main(String[] args) {             System.out.println("Hello World!");     }  }          Compiling and Running the Program
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. 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. To run the program:

  • Choose Run > Run Project (F6).

The next figure shows what you should now see.

Congratulations! Your program works! 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. Building and Deploying the Application
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:

  • Deletes any previously compiled files and other build outputs.
  • Recompiles the application and builds a JAR file containing the compiled files.

To build your application:

  • Choose Run > Clean and Build Project (Shift-F11)

You can view the build outputs by opening the Files window and expanding the HelloWorldApp node. The compiled bytecode file HelloWorldApp.classis within the build/classes/helloworldapp subnode. A deployable JAR file that contains the HelloWorldApp.class is within the dist node.

For information on how to run the application from the command line, see the Starting Your Java Application chapter of the Packaging and Distributing Java Applications tutorial.

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 726

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

Which version to be download for (web development & design)  ?? from following

https://netbeans.org/downloads/

RSS

Latest Activity

彡JK彡 ❤️ replied to +"Certified Gangster"++'s discussion Hosla
50 minutes ago
彡JK彡 ❤️ replied to +++Mahoo+++'s discussion apko chun lia jata ha
52 minutes ago
Shine--Ex-VUStudent liked + sílєnzíσ's discussion If fb, google nd youtube would have been subjects..... !!!!!!!!!!!!
53 minutes ago
Biya replied to Biya's discussion Ehsaas...
53 minutes ago
彡JK彡 ❤️ replied to + ! ❤INNOCENT❤'s discussion Akhri Salam Smjh kr
54 minutes ago
彡JK彡 ❤️ replied to + !! SARAH's discussion + i dnt knw where it could fit into ur story but it is......!!
57 minutes ago
彡JK彡 ❤️ replied to + !! SARAH's discussion + i dnt knw where it could fit into ur story but it is......!!
58 minutes ago
彡JK彡 ❤️ replied to Biya's discussion Ehsaas...
1 hour ago
彡JK彡 ❤️ replied to +¢αяєℓєѕѕ gιяℓ's discussion True.....
1 hour ago
彡JK彡 ❤️ replied to + ! ! ! ! Noor E Kayenat's discussion Please Raise Ur Hand !!
1 hour ago
彡JK彡 ❤️ replied to Biya's discussion Aurat Bari Piyari Cheez Hai.. :D
1 hour ago
彡JK彡 ❤️ replied to + Iuuoɔǝut+'s discussion koi asa shaks hua kare ....
1 hour ago
Biya updated their profile
1 hour ago
彡JK彡 ❤️ replied to Whispering Soul's discussion Kabi kabi...
1 hour ago
彡JK彡 ❤️ replied to + !! SARAH's discussion hahhahahahaha!!!!!!
1 hour ago
彡JK彡 ❤️ replied to + !ѕιмρℓє ¢н's discussion choti choti khwahishein....
1 hour ago
彡JK彡 ❤️ replied to + Iuuoɔǝut+'s discussion Mind blowing mehndi design ...
1 hour ago
彡JK彡 ❤️ replied to + Iuuoɔǝut+'s discussion Mind blowing mehndi design ...
1 hour ago
Siddiq khan kakar replied to Siddiq khan kakar's discussion bssss
1 hour ago
彡JK彡 ❤️ replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Dedicated to All teachers
1 hour ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service