I am having various .jar files in my system. I have the JDK and JRE installed. Most of jar files run on double clicking, but there are 2 - 3 jar files which do nothing on clicking. Help me. By the way I am using windows 10 64 bit
- have you checked whether those jars contain a valid (and correct) manifest file?Stultuske– Stultuske2018-01-22 11:03:18 +00:00Commented Jan 22, 2018 at 11:03
3 Answers
Problem:
I could not start JAR files just by clicking on them in Windows 10. I was messing around with the "control panel" ... forget it.
What I've found out:
- Start a command line (cmd) as an Administrator
Check your file type association:
ftype jarfile assoc .jarI had to change my java path to a different one
ftype jarfile=C:\myjavapath\javaw.exe -jar "%1" %*Which basically means, that if someone starts a jar file, the command would be:
C:\myjavapath\javaw.exe -jar "example.jar" parameter1 parameter2For me, I also had to change my .lnk files to only contain the name of the jar file, not the whole command. Type in the whole path of the jar file in the "target" field in the properties of the link file (.lnk).
Comments
Your Manifest file should contain a line:
Main-Class: classname