I have made some GUI Java application and exported it as "Executable Jar". But Windows shows me this file as RAR archieve, and I can't execute it! How can I fix it?
1 Answer
From the command line, run: java -jar <jarfile>.
From Windows Explorer, right-click on the JAR file, choose "Open with..." and select your local Java installation.
Make sure you have a JRE installed. Normally Windows will recognise JAR files and do the right thing with them. The fact that they are being identified (understandably) as an archive would hint that you have no JRE.
3 Comments
malcoauri
I don't know which Java file I should choose
Federico klez Culloca
@ДенисНагибин the jar file itself
Alex Lynch
@ДенисНагибин on my machine, i would "open with" the following binary:
C:\Program Files\Java\jre6\bin\java.exe. hopefully yours is in a similar location and you can choose appropriately.