The answer is really simple:
rename the jar file like myjar.zip, and then uncompress it. Under the new folder, go into the subfolder 'META-INF', and the file 'MANIFEST.MF' could be edited. The original info inside created by Processing usually says:
Manifest-Version: 1.0
Created-By: Processing 1.5.1
Main-Class: myproj
we can add a few lines at the end:
Application-Library-Allowable-Codebase: *
Permissions: all-permissions
Codebase: *
then save the MANIFEST.MF, compress the whole folder, and rename the zip file as a jar file. At last we can sign it with the certificate bought:
keytool -list -storetype pkcs12 -keystore cert.p12 -v | grep Alias
jarsigner -storetype pkcs12 -keystore cert.p12 proj.jar "cert.Alias" -tsa http://timestamp.comodoca.com/rfc3161 # I bought it from COMODO so the server link is like this
Upload it to the server and that's it.