nus-cs2103-AY2122S2 / forum

13 stars 1 forks source link

Jar file working on my computer but not on other computers #167

Closed tanweien closed 2 years ago

tanweien commented 2 years ago

Hi I'm using mac and I built my jar file using gradle shadowJar. It runs fine on my computer even when I transferred it to an empty folder. I am also able to open jar files sent by my groupmates.

However, my friends are unable to open my jar file. My friends mac had a "jar file is damaged and cannot be opened" error when he tried to open my file.

damithc commented 2 years ago

@tanweien You need to figure out if it is a problem with your JAR or a problem on your friend's setup. You can share the JAR file here so that other Mac users can try to reproduce the problem.

tanweien commented 2 years ago

@damithc My group mates are able to open each other's jar file except mine. So I think it might be a problem with my JAR file.

This is my jar file. https://github.com/tanweien/ip/releases/tag/A-Release.

Thank you.

tanweien commented 2 years ago

Managed to resolve the issue. Apparently java -jar filename.java is necessary to open files built on mac, regardless of if the other computer is a mac or windows.