Java Development Basics ~ Development Environment Settings and Project Creation ~

Java development basics ~ Development environment settings ~

Since it is difficult to set various things, let's prepare an environment where you can touch java immediately by inserting eclipse for the time being.

Download and install Eclipse?

For the download procedure of eclipse with the Japanese patch, refer to here. (By the way, it seems to be installed on mac) I have downloaded the "latest version" on this page, but it may not be stable, so I always include the previous version. This time I added photon </ font> </ b>. (As of June 2019)

Creating a project

Let's output "hello world" for the time being.

Open the downloaded eclipse. スクリーンショット 2019-06-09 18.22.53.png Leave the default here and click Start to start eclipse.

Go to File> New> Java Project to bring up the project creation dialog. Screenshot 2019-06-09 18.28.50.png

When the dialog opens, enter learnJava in the project name and click Done. スクリーンショット 2019-06-09 18.30.54.png

The project created like this is displayed. Also, click the x button in the blue square to close the obstructive part.

スクリーンショット 2019-06-09 18.34.16.png

Click the triangle on the left to open learnJava. Align the cursor on top of the src and click New> Package. スクリーンショット 2019-06-09 18.44.26.png When the dialog appears, change the package name to sampleCode and click Finish. スクリーンショット 2019-06-09 18.48.34.png

Hover your cursor over the created package and click New> Class. スクリーンショット 2019-06-09 18.50.21.png When the dialog is displayed, check Hello World, public static void main (String [] args) in the name and click Finish. スクリーンショット 2019-06-09 18.51.55.png

The automatically generated code will appear, so please add the description as shown in the image below. スクリーンショット 2019-06-09 18.54.50.png

After adding, click the triangle to the right of the green button on the upper left and click Run> Java Application. Screenshot 2019-06-09 18.57.54.png

A screen called console will appear and the words "hello world" will be output. It's sober, but this is a program ... Screenshot 2019-06-09 18.59.15.png

Next time, I will actually go programming for the first time.

Recommended Posts