Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report