Reputation: 15
While watching a tutorial on YouTube, the creator exports a Java JAR file and opens it which runs his created app. When I attempt to repeat the process, it just opens the content of the JAR.
Upvotes: 1
Views: 2428
Reputation: 20914
Looks like your computer is configured to open JAR files with WinRAR.
You can change this by going to Control Panel > Default Programs
Set java as the program to open JAR files.
Alternatively you can open a cmd window or PowerShell window and type the command
java -jar <path to your JAR file>
Good Luck!
Upvotes: 3
Reputation: 8354
This is because your jar file is being opened in winrar by default. right click on your jar and from open with...
choose java to run the jar
Upvotes: 1