JAVA Learning Series l 1st "Setting Environment"

Java is the most popular language for working with computers.
Android is also based on the Java language. Big-Data, Artificial Intelligence and etc..
have increased the demand for data analysis, and the use of other
languages (R, Python) has increased,
but it is still the most used language.

[  Tools needed for Java  ]

In order to develop J programs, a Java Development Kit (JDK) is required.
And let's develop with Eclipse as a text editing tool to make development easier.
The JDK includes a compiler (javac.exe) that translates the Java language
written in Text into a machine language understood by a computer,
and a program that runs compiled Java programs (java.exe).
It is an essential tool.
In addition, the JDK provides a set of command toolbars (Java API libraries),
and you will learn how to use this command tool one by one.

[  JDK Download & Install  ]

The JDK can be downloaded from Oracle, the Java developer.
For Windows OS, download jdk-8u101-windows-x64.exe at the bottom of the figure below.

Run the downloaded file to install the JDK. During the installation process,
you will see the following screen which you can see the folder where
JDK is installed "C: \ Program Files \ Java \ jdk1.8.0_101 \".
Finish the installation as default setting.

[  Eclipse Download & Install  ]

Eclipse, the editing tool, can be downloaded from the link below. (For Windows OS)
Run the downloaded file and select "Eclipse IDE for Java EE Developers"
from the screen to choose which version to install.
Select "C: \ Program Files \ Java \ jdk1.8.0_101 \",
which is the folder that contains the JDK you installed previously.
If the folder is not displayed, click "Browse ... "Button to select the folder.
When the installation is complete, click the Launch button to launch Eclipse.

[  Running Eclipse development tools  ]

When you run Eclipse, you are prompted to select a working folder
(workspace folder) where the files will be stored.
Maintain the defaults and click the OK button.
After that, close the “Welcome” tab.
Finally, you will see the Eclipse integrated development screen
for Java development (text input), compilation
(creating a class file that the computer understands),
and execution (class file execution).

[  Write and run your first Java program.  ]

 To develop in Eclipse, you need to create a project for
Java development and develop it here.
A project can be understood as a "division folder" that
differentiates software products when developing multiple software products.

[  Creating project  ]

Eclipse, the editing tool, can be found on the Eclipse screen under
"File" -> "New" -> "Project ... " and
" New Project "screen will be displayed.
We will do Java development, so select "Java Project" at the top and press the “Next” button.
Write the desired project name in the Project Name field and
enter Javastudy and click the "Finish" button.

Since it is a Java project, a window asking you to open a perspective view
that makes Java development easier appears, click the Yes button.

At the first time to install and run, Eclipse has a lot to ask.
Finally, the creation of a project called “Javastudy” is complete.
So far, this is the process of setting up the environment.
Now all I have to do is run after the Java source code.
Write and run your first Java source code

Right-click on the “src folder” in the Package Explorer of
the Eclipse editing tool and select "New" -> "Clsss".

Enter HelloWorld as the name of the source file to be developed,
select "public static void main (String [] args)", and click the Finish button.
Finally, the java source window is displayed.
Type 1 line to output HelloWorld in main function as below and save (Ctrl-S shortcut).
                                                        public class HelloWorld {

                                                                public static void main(String[] args) {
                                                                        // TODO Auto-generated method stub
                                                                       System.out.println("Hello World!");
Let's run the example above. To run, select "Run" -> "Run" or press "Ctrl + F11 Hotkey".
As below, you may see the screen that compile and run correctly and output Hello World.
In this tutorial, we have done a lot of things including installing Java,
 installing Eclipse, writing source code, compiling and running.


Popular posts from this blog

[2018 Global Industry Revolution Conference l EXEM 4.0 People-centered, Future innovation]

IT esay, IT is! l Eleventh, the godfather of deep learning Jeffrey Hinton

EXEM at AWS Summit | Seoul 2018