Eclipse Ⅶ

Hello everyone, continue to share the seventh part of the content today, if you like it, you can like and bookmark it, this is my source of motivation hahahhah!

Let's talk about Eclipse generating jar packages, Eclipse closing projects and Eclipse compiling projects today.

Without further ado, let's start!

Eclipse generates jar package

Open the Jar file wizard

The Jar file wizard can be used to export the project as a runnable jar package.

The steps to open the wizard are:

  • Select the project content you want to export in the Package Explorer. If you want to export all classes and resources in the project, just select the entire project.
  • Click on the File menu and select Export.
  • Enter "JAR" in the input box.

  • Select the JAR file option in the options to start the wizard.
  • Click the Next button

Using the Jar File Wizard

On the JAR File Specification page, you can do the following:

  • Enter the JAR file name and folder
  • By default only class files are exported. You can also export the contents of the source code by checking the "Export Java source files and resources" option.

  • Click the Next button to modify the JAR package options
  • Click the Next button to modify the JAR Manifest description information
  • Click the Finish button to complete the operation

Eclipse close project

Why is the project closed?

An Eclipse workspace contains multiple projects. An item can be either off or on.

The effects of opening too many projects are:

  • memory consumption
  • Occupies compile time: when deleting project .class files (Clean All Projects) and recompiling (select Project > Clean > Clean all projects on the menu).

How to close a project?

If the project is not in the development stage, we can close the project first.

Select the project to close on the Package Explode view and close the project by selecting Project > Close Project from the menu.

closed project

After the project is closed, we can see that the icon of the project has changed in the Package Explorer view. A closed project cannot be edited.

reopen project

You can do this by selecting Project > Open Project.

 

Eclipse build project

Compile the Java project

A project can be associated with multiple compilers.

The java project is associated with the java compiler. You can view the compiler associated with the project in the following ways:

  • Right-click on the project in the Package Explorer view and select Properties
  • Click Builders in the tree menu on the left

The java compiler is used to compile java projects. By clicking the New button, we can associate the java project with the Ant builder compiler.

The java compiler generates class files by compiling java projects. When the project source code changes, the java code will be automatically recompiled.

You can disable automatic builds by removing the Build Automatically item from the Project menu.

If you disable the automatic build function, the project needs to compile the java project through the Build Project menu item in the Project menu. If the Build Automatically (automatic compilation) item is checked, the Build Project (manual compilation) menu item is not available.

Guess you like

Origin blog.csdn.net/slave_of_life/article/details/130918347