“Could not find the main class” when double-clicking .jar file

前端 未结 6 1804
逝去的感伤
逝去的感伤 2020-12-02 16:58

First: I realize that this issue should be quite simple and lots of people seem to have experienced it. However, it appears my issue may be slightly different from

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-02 17:56

    Perhaps your file associations got messed up. At the command prompt, try running

    ftype | find "jarfile"
    

    On my 64-bit Windows 7 computer, that shows

    jarfile="C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -jar "%1" %*
    

    You can also change it with ftype:

    ftype jarfile="C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -jar "%1" %*
    

提交回复
热议问题