Pregunta

I put some Processing jar files online for display. Because of Java update, I bought the code signing certificate to sign it. But now the jar files are still blocked because the output of Processing doesn't contain a MANIFEST.MF file:

Java Query Answer

It seems that I can't open the jar and insert a MANIFEST.MF with Eclipse. So I asked the programmer for the code and then I can add the mf like this instuction. The project folder looks like:

project.pde
main.pde
button.pde
connection.pde
data[folder]

So now I follow the Eclipse tutorial and reach step 4 (Processing core.jar imported). The tutorial starts to write code. While how should I use the existing pde files to complete the work? Thanks!

Anyone who knows how to export Processing jar with MANIFEST.MF inside? enter image description here enter image description here enter image description here

¿Fue útil?

Solución 2

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.

Otros consejos

What version of Processing are you using? If you're using the latest, you can simply export your sketch as an application and then use SvgExe to create a self-extracting runnable jar from Processing's output.

Or you can convert the code into a Java application, but that's not going to be as simple as importing the .pde files. Tutorial here: http://processing.org/tutorials/eclipse/

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top