Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The detailed process of installing and setting up a project for eclipse

Shulou Source: shulou.com Published: 2022-06-02 07:22:11 10月16日 Update

This article mainly explains "eclipse installation and the detailed process of building a project," interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's take you to learn the detailed process of installing eclipse and building a project.

This installation tutorial is based on Java already installed on the computer.

1. download

Address: www.eclipse.org/downloads/

Select: download packages

After downloading, decompress, 64-bit naming is this…

2. start the installation

First installation, specify work folder, click launch to continue

After installation, it will be opened directly

3. Hello world! --Hello world!

(1) Open eclipse for the first time and select File-New-if there is no java project option. File-New-project, then java project, click next

Name the project and click finish

This option appears, and it is recommended to start with lowercase. The purpose of this module-info.java is that existing non-modular Java projects can be quickly converted to modules by creating module-info.java. I don't understand it very much. It seems that it is harmless. Just add it by the way! Select create and the project is complete.

2) Writing Java programs

Select src, right-click-new-package, after naming, click finish

Select the package, right-click-new-class, class names generally start with capital letters

package com.abc;

public class HelloWorld {

public static void main(String[] args) {

// TODO Auto-generated method stub

System.out.print("Hello world! ");

}

}

Click the green arrow to run.

Error occurred during initialization of boot layer.

helloMyJava.class found in top-level directory (unnamed package not allowed in module)

An error occurred during initialization of the boot layer.

Find helloMyJava.class in the top-level directory (unnamed packages are not allowed in modules).

This is because JDK9 and above introduced modules. So if you create a class that runs separately in the default package, it will not compile. There is no such problem in JDK8.

Also, if you still want to run separate classes in the default package. Delete module-info.java and you'll be fine.

At this point, I believe you have a deeper understanding of "eclipse installation and the detailed process of building a project," may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Tags: Project module selection process run content beginning is in learning practical deeper function interest reason can be passed at the same time address basic capitalization practicality Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi OPPO Reno Apple MySQL Docker