Run .jar on MacOS

1

I have a question and I can not run .jar files on my mac. The file is xlogo.jar is downloaded from the official website: link is to teach children the basics of programming . In theory, it should be executed just by double clicking on the file; but for some reason it is associated with a decompressor. I have already installed java, jre, jdk. All. I have also tried typing in the terminal: java -jar xlogo.jar and the following appears:

I hope someone can help me, because I'm confused. I know it's not the file because it runs on another macbook, I do not know what the problem is specifically. Thanks.

    
asked by Fesa 29.04.2017 в 13:46
source

2 answers

0

It does not work for me either on Mac OSx Sierra. I get the same error as you:

  

Exception in thread "main" java.lang.NoClassDefFoundError:   javax / media / opengl / GLException at java.lang.Class.forName0 (Native   Method) at java.lang.Class.forName (Class.java:264) at   javax.media.j3d.Pipeline $ 1.run (Pipeline.java:162) at   java.security.AccessController.doPrivileged (Native Method) at   javax.media.j3d.Pipeline.createPipeline (Pipeline.java:157) at   javax.media.j3d.MasterControl.loadLibraries (MasterControl.java:965)     at javax.media.j3d.VirtualUniverse. (VirtualUniverse.java:299)     at xlogo.Logo.main (Unknown Source) Caused by:   java.lang.ClassNotFoundException: javax.media.opengl.GLException at   java.net.URLClassLoader.findClass (URLClassLoader.java:381) at   java.lang.ClassLoader.loadClass (ClassLoader.java:424) at   sun.misc.Launcher $ AppClassLoader.loadClass (Launcher.java:331) at   java.lang.ClassLoader.loadClass (ClassLoader.java:357) ... 8 more   Closing XLogo. Cleaning tmp file

When I looked at the console, you can see that the reason why it does not work is a problem linked to security:

assessment denied for xlogo.jar
com.apple.message.domain: com.apple.security.assessment.outcome2
com.apple.message.signature2: bundle:UNBUNDLED
com.apple.message.signature3: xlogo.jar
com.apple.message.signature5: UNKNOWN
com.apple.message.signature4: 3
com.apple.message.signature: denied:no usable signature
SenderMachUUID: 295213F8-F12F-3676-9CC8-EC3AD4E8AC4B

I also tried to run it using Java Web Start, as they explain here :

  

Java Web Start

     

Now, you can start XLogo directly from a web page using 'Java Web   Start '(you still need a JRE installed). Just click the following   link:

     

Start XLogo on line.

And it gives me a security error:

The link that says More information, is this .

On the page say that the latest version of Mac OS tested is: Mac OS X (Tiger Leopard) , which dates from a few years ago.

On the other hand, they offer the source code on this link , a possible solution would be to download it and compile it, and if it gives you a compilation error you could add the missing classes of the javax/media/opengl/ library, because that is what the error message indicates or contact directly with those who have created or maintain the project.

    
answered by 29.04.2017 в 20:17
0

The estimated problem is that the file .jar that you have when you pack it did not tick the box in which the libraries necessary for the correct execution of the program are added.

The trace of the error says it is missing the Class javax / media / opengl / GLException

    
answered by 29.04.2017 в 20:04