Possible Duplicate:
Python: How can execute a jar file through a python script
I have already made a executable jar file in java - Blender.jar, but I don't understand why it doesn't run. I am thinking that the problem is the VM argument that I should add. I tried to do this
import os
if __name__ == "__main__":
os.system("java -jar Blender.jar [-Djava.ext.dirs=lib:lib/macosx]")
or
import subprocess
subprocess.call(['java', '-jar', 'Blender.jar'])
although in the second I don't know where I should place the VM arguments.
Could anyone be very kind and help me? Is there any site that I could look at?
Although, the code has no mistakes, when I try to execute it from terminal it gives me this answer
Exception in thread "main" java.lang.SecurityException: sealing violation: package javax.media.j3d is sealed
at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.eteks.sweethome3d.j3d.Component3DManager.setRenderingErrorObserver(Component3DManager.java:104)
at com.eteks.sweethome3d.SweetHome3D.addComponent3DRenderingErrorObserver(SweetHome3D.java:491)
at com.eteks.sweethome3d.SweetHome3D.init(SweetHome3D.java:383)
at com.eteks.sweethome3d.Blender.main(Blender.java:181)