You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

jar file

hello people i have this problem with my jar file when i try to open a jar file this error mesagge accurs

This java file could not be launched check the console for possible error mesagges. i tride searching for it but all the videos that i found are all from 4 to 5 years ago and they dont work so if anyone can help please reply

Please And Thank You


(sorry if i misspelled anything im not very good at typing)

iMac Pro

Posted on Jun 18, 2019 1:50 PM

Reply
Question marked as Top-ranking reply

Posted on Jun 20, 2019 2:15 PM

So it looks like the problem is with that Jar itself, it's not been set up properly, internally, to be executable.


It leads me to wonder are you sure it's designed to be ran (i.e. it is an installer or application) and not a module or plugin for another program?


For example, this is a random test/sample Java program that will open a window on your Mac:

http://www.java2s.com/Code/Jar/s/Downloadsamplejar.htm


If that comes up for you then you know your Java is working and it's something with that particular Java JAR file you're trying to run.

4 replies
Question marked as Top-ranking reply

Jun 20, 2019 2:15 PM in response to MaxRy

So it looks like the problem is with that Jar itself, it's not been set up properly, internally, to be executable.


It leads me to wonder are you sure it's designed to be ran (i.e. it is an installer or application) and not a module or plugin for another program?


For example, this is a random test/sample Java program that will open a window on your Mac:

http://www.java2s.com/Code/Jar/s/Downloadsamplejar.htm


If that comes up for you then you know your Java is working and it's something with that particular Java JAR file you're trying to run.

Jun 20, 2019 9:26 AM in response to MaxRy

Open up a Terminal app window and make sure you have Java installed by typing the command:

java 


If that produces a bunch of output then you should be able to change to the folder of where your JAR file is located and type:

java -jar myfilename.jar


If the file is located in your desktop (or if you move it there) you could type:

java -jar ~/Desktop/myfilename.jar


If you don't have Java you can install the Java JDK for Mac OS x64 here (just click to accept the license agreement first)

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html


I believe that will also give you the Java launcher app if you right-click the JAR file in finder in addition to adding command-line terminal Java support.


I hope this helps solve your issue my friend!


Jun 20, 2019 1:23 PM in response to rcosta887

so i do have java installed but when i open the the terminal app and i put in the command

java -jar ~/Desktop/example.jar

Its says


no main manifest attribute, in /Users/Myname/Desktop/example.jar

and i tride opening the jar file and it still didnt work. And i also whanted to say this that the first jar file that i installed worked and so i tride downloading another one and then it stoped working and i tride opening the first jar file that i have installed it worked but for some reason non f my jar files work exept the first jar file that i have installed if theres any reason why please reply again im sorry for telling you again but its the only website that response so please and thank you.

Jun 27, 2019 12:41 PM in response to rcosta887

so it did open and im sorry for responding late but um the jar file you sent me worked but i was wondering i looked up how to install a thing that i wanted and it was a jar file but i also put in for mac users and there was alot of videos and so i watch one of the vedeos and i followed the instructions and so i downloaded the jar file and it didnt work but the person that was doing the tutorial did work for him and it was on mac it makes me confused becouse it doesnt work for me but it does for him was. was it becouse it was a older version or... what i also tride so many versions and none of them work even if they say mac version so please tell me whats happening is something wrong with my mac if so please respont please and thank you.

jar file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.