What can be done if the Java jar file could not be launched?

349    Asked by Amitjaisawal in Java , Asked on Oct 14, 2022

I'm trying to download the file http://algs4.cs.princeton.edu/code/algs4.jar and launch it with Jar Launcher (the default application). However, I'm getting this: Java jar file could not be launched Following https://discussions.apple.com/thread/4827576?tstart=0, I've also tried to use Archive Utility; this appears to create an algs4.jar.cpgz file but I'm not sure what

Answered by Amit raj

As the error message - e if the Java jar file could not be launched says, you can check the Console (/Applications/Utilities/Console) for error logs. You could also open a Terminal window and run the jar from the command line, which should cause any errors to output into the terminal. If your jar is in your downloads folder you would run:


  java -jar ~/Downloads/algs4.jar

Once you have the error, if you can't figure it out, update your question and we can try to provide more information.



Your Answer

Interviews

Parent Categories