pf4j icon indicating copy to clipboard operation
pf4j copied to clipboard

What is the difference between pf4j and JPMS?

Open ghanIn-dev opened this issue 6 years ago • 2 comments

I am preparing a project to monitor the service.

I am trying to create a high-expansion project to monitor at various points, and I am interested in pf4j and JPMS (Java Platform Module System).

I have a question about the example. What is the difference between pf4j and JPMS?

First of all, JPMS can use jar as a plugin if you make jar of each monitoring point, but there was a problem in that it was necessary to load it in main and initialize it.

How about pf4j ??

p.s pf4j is in the process of attempting an example with an error. so im try to fix it but when i saw pf4j example its similar with JPMS

ghanIn-dev avatar Jan 02 '19 02:01 ghanIn-dev

It's not very clear for me your question but I will try to respond you.

I have a question about the example. What is the difference between pf4j and JPMS?

Do you talk here about demo or what? Related JPMS, some times ago, I shared a project on GitHub, a very light one, that is a JPMS demo similar with PF4J demo. The similarity between demos was introduced consciously by me in order to easily compare both approaches. I feel that you know already about this project. You can compare yourself both demos to see differences. It is not clear for me if you want to know the differences between PF4J and JPMS or between demos.

First of all, JPMS can use jar as a plugin if you make jar ...

By default PF4J can use jar as plugin, also. Both variants jar and zip are supported by default. My idea is to switch the PF4J's demo from current zip file for plugin representation to more simple (fat) jar. The initial format/representation for a PF4J plugin was zip (I think that is more descriptive, you have dependencies of plugin in a lib directory), but after some iterations of development, PF4J was able to support the more standard jar format, also. I think that using the jar format for plugin will simplify things. PF4J is powerful and very extensible but the initial goal of this project is to bring a modular system to people (small and medium projects). According to this initial goal I think that switching from plugin zip to jar format for demo is very welcome.

In the past I created a PF4J-JPMS integration project, with the goal to see if PF4J can be complementary to JPMS, to see if both approaches can work together. Maybe you will find some useful information related to your question in the readme file of this project.

One of my current paid work is to migrate a big ERP system of one of my clients from Java 8 to Java 11. I hope that after this work I will know more things and details about JPMS.

If you have concrete question please let me know.

pf4j is in the process of attempting an example with an error.

Do you say that you encounter an error when you try to run PF4J demo? If your response is yes, please describe the error here.

decebals avatar Jan 02 '19 12:01 decebals

image image

that's the error when java -jar demo-dist\pf4j-demo-app-2.6.0-SNAPSHOT.jar with jdk1.8 and jdk1.7

maybe build its all ok image

ghanIn-dev avatar Jan 03 '19 02:01 ghanIn-dev

Close it due to lack of response. You can reopen it with a new comment.

decebals avatar Feb 08 '23 07:02 decebals