Java HotSpot(TM) 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "org.update4j.DynamicClassLoader"). To use archived non-system classes, this property must not be set
juin 02, 2021 9:24:01 AM org.update4j.util.Warning path
WARNING: No files were found that are set with 'classpath' or 'modulepath' to true;
although perfectly valid it's rarely what you want.
Please refer to: https://github.com/update4j/update4j/wiki/Documentation#classpath-and-modulepath
Exception in thread "Thread-6" java.lang.RuntimeException: java.lang.ClassNotFoundException: com.eukles.resoposte.AgentResoposteV2
at org.update4j.service.DefaultLauncher.run(DefaultLauncher.java:123)
at org.update4j.ConfigImpl.lambda$doLaunch$13(ConfigImpl.java:693)
at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: java.lang.ClassNotFoundException: com.eukles.resoposte.AgentResoposteV2
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:433)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:586)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
at org.update4j.service.DefaultLauncher.run(DefaultLauncher.java:102)
... 2 more
Hello everybody,
In the "update" method of the org.update4j.Configuration class
-> public boolean update(PublicKey key, UpdateHandler handler) {
it receives a PublicKey to check the signature of the jars.
I would like to know How I can get this PublicKey to be able to pass it as a parameter to the "udpate" method. Could someone help me?
Another question is: I already have a signed jar, how do I get the signature of a jar to pass in the "signature" parameter in the config.xml file
signer()
method.
PublicKey
and PrivateKey
are standard Java classes that encapsulate any keypair algorithm. For your specific algorithm or implementation you need to read the related docs how to obtain the keys which you can later pass in those methods.
I was able to pass the certificate with PublicKey.
But now I need to get, for each jar, the "signature" attribute string to put in the config.xml file.
The update4j code will check this string in the following code:
-> !sig.verify(Base64.getDecoder().decode(file.getSignature()))
Does anyone know how I can get this signature from a jar file?