Eclipse online installation of fatjar and error resolution

After chopping hands, the fraud call came before the express delivery was received. How to improve the privacy and security of e-commerce>>>

eclipse online installation of fatjar and error resolution

I. eclipse version information

I am using the latest version of eclipse. The version information is as follows:

Eclipse Java EE IDE for Web Developers.

Version: Oxygen.2 Release (4.7.2)
Build id: 20171218-0600

2. Online installation steps of fatjar

In eclipse, follow these steps:

help -> To install new software, enter the following address in the work with input box:

http://kurucz-grafika.de/fatjar

Then enter and wait for installation. It takes a long time

The installation steps are very simple. This is online installation. If you use the copy method, there will be no error information even if there is an error and the installation fails. Online installation will give you error information. Therefore, online installation is recommended

After installation, you will see the option information as shown in the figure below in the preferences interface

This page is configured with the default options of the fatjar plug-in, which is fine by default

III. problems and Solutions

1. Problems

The following error was encountered during installation

Error message:

An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.

session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust, operand=, action=).
Error reading signed content.
Exception in opening zip file: D:\software\eclipse\plugins\net.sf.fjep.fatjar_0.0.31

2

1

I didn’t understand the specific reason for the above error information. At first, I thought it was caused by my too high version of eclipse, so I specially installed the low version of eclipse framework. The installation steps are as follows:

In eclipse, follow these steps:

help -> To install new software, enter the following address in the work with input box:

http://download.eclipse.org/eclipse/updates/4.5

Select as shown in the figure below, and then install next

After the installation is completed, an error is still reported when you re install fatjar, which proves that it is not the above problem. Later, I installed version 4.7 back and it still works

2. P2 problem

Later, I saw the following explanation on the Internet:

The reason for the error is an error in eclipse’s update management P2. P2 has a garbage collection mechanism. If the previously deleted jar package is reloaded before it is recycled, the system will not download it again, but it can’t find the jar package, so it reports an error

To solve this problem, you need to enter the following command on the command line:

eclipse -application org.eclipse.equinox.p2.garbagecollector.application -profile ****

****Is the value of eclipse.p2.profile in eclipse/configuration/concfig.ini

As shown in the figure below, it is the place to find this value:

I tried this command under the command line of wind, but it didn’t work

Because this command starts with eclipse, if you enter it, you will be prompted that you are not a built-in command. It is said on the Internet that you can add eclipse environment variables to environment variables, but I don’t know how to add eclipse environment variables

Later, I saw that the CMD command could be used in eclipse on the Internet, so I got this method as follows:

In eclipse, do the following:

Run-> External Tools-> External Tools Configurations

The following interface appears

Select new in the red box, fill in the information as shown in the figure, click Run, and then input the command in the console window. According to my situation, I input the following command, and do not copy the parameters:

eclipse -application org.eclipse.equinox.p2.garbagecollector.application -profile epp.package.jee

The following figure is the operation interface:

Then restart eclipse, install again, install successfully, restart OK

IV. using fatjar

1. Application mode

After my test, it seems that the fatjar plug-in can only be used in Java mode. As shown in the figure below, several modes are installed in my eclipse

2. Use steps

step one

Among these modes, only Java mode can right-click to see the following operation options:

Click the red box option above to enter the fatjar operation interface

Step 2

The following figure shows the important configuration interface of fatjar packaging

The figure below is divided into three areas, according to their own practice, respectively, if there are errors, please remind me to correct them in time:

This page is generally checked according to the current configuration

the first block

Jar Name: the path where the jar package is stored plus the name of the jar package

Use external jar Name: if not checked, the jar package can only be stored in a certain location in the workspace, and the name can be customized. As shown in the figure below:

After checking, the jar package can be stored in any directory, as shown in the following figure:

the second block

This is better than eclipse, you can choose to use the three-party dependency jar package to package together or just package the code

After selecting manifest file, you can use the manifest.mf file you edited. The manifest input box corresponds to the path of the selected file

Select manifest file is not checked. You need to enter the value of main class: which is the main class to run. Class path does not need to be selected. The following two items are checked automatically. At this time, the dependency package will be packaged with the code you wrote, and can be run directly with Java commands

the third block

If it is checked, the final jar package will contain two jar packages. You can’t see your relevant information. You can try it to know its effect

Step 3

After configuring the previous page, click next to enter the next configuration page, as shown in the following figure:

This page is to select the code you want to package, according to their own needs to choose

​​​​​​​

After selection, click fish

Similar Posts: