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

How to solve the abnormal problem after the upgrade of Eclipse plug-in

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Eclipse plug-in upgrade after the abnormal problem how to solve, many novices are not very clear, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

Eclipse plug-in problems are relatively common. Let's take a look at some of the recent troubles encountered by vwpolo about Eclipse plug-ins:

Recently, my colleague has been bothered by a problem for a long time. Let me take a look at it. The problem is that our platform is based on Eclipse RCP 3.3.0 and regards each functional module as a plug-in project. The system provides the function of automatically updating the plug-in based on Http, and requires that the old version be deleted after the plug-in update is completed (our own version comparison method). Everything is working normally. However, colleagues in charge of deployment upgrade the version number of the plug-in system to 4 segments, such as the previous version composition is "major version number." The second edition number. The build number is now developed to the major version number. The second edition number. Build number. For example, if the build number is upgraded from "3.0.0100" to "3.0.0100.1", the function of automatically deleting old plug-ins does not work properly. For example, a plug-in with a main plug-in version number of 3.0.0100.9 can be deleted after startup, while the plug-in of "3.0.0100.11" cannot delete the plug-in of "3.0.0100.9".

In fact, this has something to do with the version mechanism of OSGI. The marking and comparison of plug-in versions within Eclipse is done through Version.java in the "org.eclipse.osgi.*" plug-in. The field major in Version represents the major version number, minor represents the minor version number, and micro represents the mini version number (build number). The types of these three fields are int. The qualifier in Version is used to represent the build number, and the type is a string. At that time, if the fourth build number is a pure number, Eclipse will automatically format it and compare it, such as comparing 08 and 10. After the format is changed to 8 vs 10, you will get 7 larger than 8 through the compare method of the string. Of course, it will think that the version of "oss.client_1.1.1.08" is higher than "oss.client_1.1.1.10". This may be a Bug of Eclipse 3.3.0. I didn't find this problem in Eclipse 3.3.2, and it has been fixed in Eclipse 3.4 and 3.5. Be careful if you are using Eclipse 3.3.0 and have such requirements.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

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

Development

Wechat

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

12
Report