Failed to start java file java file on Mac OS X 10.6.8 with Java 1.7.0.45 using pacifist

I installed Java 1.7.0_45 on Mac OS X 10.6.8 using Pacifist [http://www.charlessoft.com/] however I cannot run the jar file that I downloaded. The jar file is a multi-threaded application.

The error message I get is:

java -jar context.jar 2013-10-31 14:14:41.898 java[330:a07] *** NSInvocation: warning: object 0x109356390 of class 'ThreadUtilities' does not implement methodSignatureForSelector: -- trouble ahead 2013-10-31 14:14:41.900 java[330:a07] *** NSInvocation: warning: object 0x109356390 of class 'ThreadUtilities' does not implement doesNotRecognizeSelector: -- abort Trace/BPT trap 

In any case, I can run the jar. I set the JAVA_HOME path correctly, and java -version displays version 1.7.0_45.

The same application works correctly on Windows Java 1.7.0_45, as well as on Linux Java 1.7.

A web search for a solution and given keywords returns very few results, and none of them has any specific solution in it. I am new to mac, so I am not able to understand the problem.

In any case, I can run Java from a folder on a Mac, as I can do on Windows and Linux, just by extracting the contents of Java and changing JAVA_HOME. If possible, I can run the JAR.

+6
source share
2 answers

I had the same problem when installing the application through a jar file, my Java was not detected by the jar application installer. Here I see that one of the methods is not available, it can be the same problem. But I am not very sure about this. make sure you have rt.jar in your JAVA_HOME / jre / lib / folder. If you do not have this, you must have it through the process of creating a symbolic link.

In the command below, replace your_java_version with the correct version that meets your requirement.

 sudo mkdir -p /System/Library/Frameworks/JavaVM.framework/Versions/<your_java_version>/Home/jre/lib 

Go to the directory:

 cd /System/Library/Frameworks/JavaVM.framework/Versions/<your_java_version>/Home/jre/lib/ 

Create a symbolic link:

 sudo ln -s ../../../Classes/classes.jar rt.jar 

Hope this solves your problem.

0
source

I get the same problem with MacOS 10.6.8 and JDK 7. To run jar I had to use the System JRE which is 1.6.x (in my case I wanted to install Squirrel

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -jar> squirrel-sql-3.6-MACOSX-install.jar

0
source

Source: https://habr.com/ru/post/957145/


All Articles