Windows Courses
Windows PowerShell
Java For Beginners
Category
- all-news (30)
- Category and Functor (8)
- Fraud (2)
- Java For Beginners (2)
- MoneyGram (1)
- News (2)
- Open Source (1)
- Protect Computer (1)
- Security (5)
- Snipping Tool: Faq (1)
- Source Code (1)
- Surveillance Software (1)
- VPS (1)
- Web Hosting (1)
- Webcam (1)
- Western Union (1)
- Windows 10 (1)
- Windows 7 (4)
- Windows 7 Faq (2)
- Windows 8 (1)
- Windows Accessories (1)
- Windows Fonts (1)
- Windows Registry (1)
- Windows Security (13)
- Windows Software (2)
- Windows Spyware (2)
- Windows utilities (1)
- Windows Virus (2)
- Windows Vista (3)
- Windows Wireless (1)
- Windows xp (1)
Math for Computing
Algo and Programmation
.
Web Languages
.
CMS and Web Design
-
Blog Archive
-
2016
(64)
-
décembre(32)
- Virus Protection not enough to keep your system safe
- Are You Protecting Your Computer?
- Annoying Spyware And Its Elimination
- Tips to Protect Your PC Files from External Attack
- The Warning signs of Online Fraud and How to avoid it
- Tips on Understanding the Dangers of Spyware and A...
- How to Install Windows TTF Fonts Automatically
- Is it time to step up to a full service VPS hostin...
- How to Run Windows on Mac: How to Install Windows ...
- How to Install Windows 7 in the Right Way
- How to Install Windows 7 on Virtual PC?
- Java First Program: Hello World
- 1 - Necessary Tools For Java Development
- How to Choose the Right Webcam Surveillance Software?
- Simple Steps - Protect your Computer Online
- Practical Use of Open Source Code Software
- 13 Comparisons of Vista vs Tiger
- 10 Reasons Why Vista is Much More Than a Spoon Ful...
- Fix Your Computer Registry
- What Is "Dllhost.exe"?
- 3 Ways That Can Help You to Remove Malware
- How Malware Works
- Protecting Your Business Website From Malwares
- Best Removal Tool For Windows
- Windows 7 Faq ( Configuring Windows )
- Windows Password Recovery Software
- Regutility - Best Registry Cleaner For Windows 10-...
- Ways to improve the signal Wifi 'wireless' in the ...
- Snipping Tool: frequently asked questions
- Use Snipping Tool to capture screen shots
- Windows 7 Faq ( Installation )
- Install Windows 7
- avril(31)
- mars(1)
-
décembre(32)
- 2015 (10)
Fourni par Blogger.
Data Bases
.
TICE & Multimedias
.
Archives du blog
-
▼
2016
(64)
-
▼
décembre
(32)
- Virus Protection not enough to keep your system safe
- Are You Protecting Your Computer?
- Annoying Spyware And Its Elimination
- Tips to Protect Your PC Files from External Attack
- The Warning signs of Online Fraud and How to avoid it
- Tips on Understanding the Dangers of Spyware and A...
- How to Install Windows TTF Fonts Automatically
- Is it time to step up to a full service VPS hostin...
- How to Run Windows on Mac: How to Install Windows ...
- How to Install Windows 7 in the Right Way
- How to Install Windows 7 on Virtual PC?
- Java First Program: Hello World
- 1 - Necessary Tools For Java Development
- How to Choose the Right Webcam Surveillance Software?
- Simple Steps - Protect your Computer Online
- Practical Use of Open Source Code Software
- 13 Comparisons of Vista vs Tiger
- 10 Reasons Why Vista is Much More Than a Spoon Ful...
- Fix Your Computer Registry
- What Is "Dllhost.exe"?
- 3 Ways That Can Help You to Remove Malware
- How Malware Works
- Protecting Your Business Website From Malwares
- Best Removal Tool For Windows
- Windows 7 Faq ( Configuring Windows )
- Windows Password Recovery Software
- Regutility - Best Registry Cleaner For Windows 10-...
- Ways to improve the signal Wifi 'wireless' in the ...
- Snipping Tool: frequently asked questions
- Use Snipping Tool to capture screen shots
- Windows 7 Faq ( Installation )
- Install Windows 7
-
▼
décembre
(32)
About Me
Google Ads
mardi 13 décembre 2016
Creating Your First Application
Your first application,
HelloWorldApp
, will simply display the greeting "Hello World!" To create this program, you will:-
Create an IDE projectWhen you create an IDE project, you create an environment in which to build and run your applications. Using IDE projects eliminates configuration issues normally associated with developing on the command line. You can build or run your application by choosing a single menu item within the IDE.
-
Add code to the generated source fileA source file contains code, written in the Java programming language, that you and other programmers can understand. As part of creating an IDE project, a skeleton source file will be automatically generated. You will then modify the source file to add the "Hello World!" message.
-
Compile the source file into a .class fileThe IDE invokes the Java programming language compiler
(javac)
, which takes your source file and translates its text into instructions that the Java virtual machine can understand. The instructions contained within this file are known as bytecodes.
-
Run the programThe IDE invokes the Java application launcher tool (
java
), which uses the Java virtual machine to run your application.
Create an IDE Project
To create an IDE project:
-
Launch the NetBeans IDE.
-
On Microsoft Windows systems, you can use the NetBeans IDE item in the Start menu.
-
On Solaris OS and Linux systems, you execute the IDE launcher script by navigating to the IDE's
bin
directory and typing./netbeans.
-
On Mac OS X systems, click the NetBeans IDE application icon.
-
On Microsoft Windows systems, you can use the NetBeans IDE item in the Start menu.
-
In the NetBeans IDE, choose File | New Project....NetBeans IDE with the File | New Project menu item selected.
-
In the New Project wizard, expand the Java category and select Java Application as shown in the following figure:
NetBeans IDE, New Project wizard, Choose Project page. -
In the Name and Location page of the wizard, do the following (as shown in the figure below):
-
In the Project Name field, type
Hello World App
.
-
In the Create Main Class field, type
helloworldapp.HelloWorldApp
.
NetBeans IDE, New Project wizard, Name and Location page. -
In the Project Name field, type
-
Click Finish.
-
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.java
open.
-
The Navigator window, which you can use to quickly navigate between elements within the selected class.
NetBeans IDE with the HelloWorldApp project open.
Add JDK 8 to the Platform List (if necessary)
It may be necessary to add JDK 8 to the IDE's list of available platforms. To do this, choose Tools | Java Platforms as shown in the following figure:
Selecting the Java Platform Manager from the Tools Menu
The Java Platform Manager
--jdkhome
switch on the command line, or by entering the path to the JDK in the netbeans_j2sdkhome
property of your INSTALLATION_DIRECTORY/etc/netbeans.conf
file.To specify this JDK for the current project only, select Hello World App in the Projects pane, choose File | Project Properties (Hello World App), click Libraries, then select JDK 1.8 in the Java Platform pulldown menu. You should see a screen similar to the following:
The IDE is now configured for JDK 8.
with the line:
Optionally, you can replace these four lines of generated code:
with these lines:
These four lines are a code comment and do not affect how the program runs.
Later sections of this tutorial explain the use and format of code comments.
Source : https://docs.oracle.com
Add Code to the Generated Source File
When you created this project, you left the Create Main Class checkbox selected in the New Project wizard. The IDE has therefore created a skeleton class for you. You can add the "Hello World!" message to the skeleton code by replacing the line:// TODO code application logic here
System.out.println("Hello World!"); // Display the string.
/** * * @author */
/** * The HelloWorldApp class implements an application that * simply prints "Hello World!" to standard output. */
Source : https://docs.oracle.com
Libellés :
Java For Beginners
Inscription à :
Publier les commentaires (Atom)
0 commentaires:
Enregistrer un commentaire