Windows 10: .jar files only execute through CMD

Discus and support .jar files only execute through CMD in Windows 10 Gaming to solve the problem; Every once in a while, my pc no longer recognizes a default app for jar files and I have to manually run them. I can open them with the command... Discussion in 'Windows 10 Gaming' started by RaneemKeblawi, May 25, 2022.

  1. .jar files only execute through CMD


    Every once in a while, my pc no longer recognizes a default app for jar files and I have to manually run them. I can open them with the command 'javaw.exe -jar' but they will not open otherwise. I have gone to Task Manager to check the path of the javaw.exe that runs when I successfully execute files using the command, however, when opening a .jar in File Explorer using the same javaw.exe, it does not execute. So, what I want to know is: What's going on, and how can I use File Explorer to run .jar files?

    :)
     
    RaneemKeblawi, May 25, 2022
    #1

  2. .Jar Files only executable trough CMD terminal java -jar [FileName]

    i have sent an massage earlier but i dit not get an reply after the first answer:


    SV

    asked on

    I have a problem i upgraded to windows 10 and i suddenly was unable to open .jar (java) files.

    I used to be able to just double click the .jar file or , open with java(TM) platform SE binary ,.

    I found a solution to that problem , by win+r (run) running :CMD and navigating to the file map, and typing this command: java -jar [FileName] than it finally worked/opened. this method is very time consuming
    and i have to run all those codes .jar files only execute through CMD :( .

    now is the question: how can i get java to work fully?

    what i want is that i can simply click the .jar file and just open it. because the method in the console is hard an time consuming

    this worked on windows 7/8 how can i fix this?

    is i now click the file set to open with java a window pops up for a split second it seems empty(a CMD like window).

    * I have the latest version of java.

    * I have tried removing and reinstalling java.

    * I am an gamer and i have a relay good/fast PC so that can not be the issue.

    You had this question


    • .jar files only execute through CMD [​IMG]




    WV

    Wungraileng Vashi replied on


    Hi Sijmen,

    Thank you for posting your query in Microsoft Community.

    I understand the inconvenience caused. I will be glad to assist you with this.

    I would suggest you to try the steps below and check if it helps:

    1. Type "default programs" in the search and open it.

    2. Click on "associate a file type or protocol with a program".

    3. Locate .jar and click on it.

    4. Click on "change program" and choose the appropriate existing program that you used to open .jar files.

    Do get back to us with the result. We will be glad to help if you need further assistance.

    Be the first person to mark this helpful


    • .jar files only execute through CMD [​IMG]



    SV

    replied on

    I followed your instructions

    and java:"Java(TM) Platform SE binary"was already selected

    and i like to know how to fix this cause is is quite annoying.
     
    Sijmen van Bommel, May 25, 2022
    #2
  3. DaveM121 Win User
    jar files

    Fixing .jar file opening on Windows requires two steps:

    • Open the Control Panel, and chose "Default Programs - Associate a File type or protocol with a program". Find .jar extension (Executable JAR file) there, and pick Java as default program to open this extension. It will probably be listed as "Java Platform(SE)".
      A faster alternative perhaps is straightforward right-click on a .jar file, and then change associated program by clicking on the "Change..." button.
    • Now open the regedit, and open the HKEY_CLASSES_ROOT\jarfile\shell\open\command key. Luckilly for us, we may specify parameters there for the (Default) value. This is normally: C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*

    I Hope this Answers your Question!
     
    DaveM121, May 25, 2022
    #3
  4. .jar files only execute through CMD

    .Jar Files only executable trough CMD terminal java -jar [FileName]

    Hi Sijmen,

    Thank you for posting your query in Microsoft Community.

    I understand the inconvenience caused. I will be glad to assist you with this.

    I would suggest you to try the steps below and check if it helps:

    1. Type "default programs" in the search and open it.

    2. Click on "associate a file type or protocol with a program".

    3. Locate .jar and click on it.

    4. Click on "change program" and choose the appropriate existing program that you used to open .jar files.

    Do get back to us with the result. We will be glad to help if you need further assistance.
     
    Wungraileng Vashi, May 25, 2022
    #4
Thema:

.jar files only execute through CMD

Loading...
  1. .jar files only execute through CMD - Similar Threads - jar files execute

  2. I can't execute .jar files at all

    in Windows 10 Gaming
    I can't execute .jar files at all: good afternoon everyone, I can't open .jar files on my windows 11 laptop.I've tried most of the fixes that pop up online:-reinstalling Java;-opening as administrator with the JavaTM Platform SE Binary;-I have my system up to date;-I tried changing variables on the system...
  3. I can't execute .jar files at all

    in Windows 10 Software and Apps
    I can't execute .jar files at all: good afternoon everyone, I can't open .jar files on my windows 11 laptop.I've tried most of the fixes that pop up online:-reinstalling Java;-opening as administrator with the JavaTM Platform SE Binary;-I have my system up to date;-I tried changing variables on the system...
  4. we want to execute cmd command through ssh in c#

    in Windows 10 Software and Apps
    we want to execute cmd command through ssh in c#: We are trying to execute some cmd command through ssh in c#.How can we proceed? https://answers.microsoft.com/en-us/windows/forum/all/we-want-to-execute-cmd-command-through-ssh-in-c/e9e1d788-c7e0-43ef-b44d-6a4422b2a570
  5. .jar files only execute through CMD

    in Windows 10 Network and Sharing
    .jar files only execute through CMD: Every once in a while, my pc no longer recognizes a default app for jar files and I have to manually run them. I can open them with the command 'javaw.exe -jar' but they will not open otherwise. I have gone to Task Manager to check the path of the javaw.exe that runs when I...
  6. .jar files only execute through CMD

    in Windows 10 Software and Apps
    .jar files only execute through CMD: Every once in a while, my pc no longer recognizes a default app for jar files and I have to manually run them. I can open them with the command 'javaw.exe -jar' but they will not open otherwise. I have gone to Task Manager to check the path of the javaw.exe that runs when I...
  7. Can't execute .jar file

    in Windows 10 Network and Sharing
    Can't execute .jar file: So right now im trying to open a jar file but ive had no success. Ive seen videos for help but noticed that most computers say "executable jar file" instead of my "jar file". Can someone help with how to change it to executable?...
  8. Windows Folder > Executable Jar File

    in Windows 10 Ask Insider
    Windows Folder > Executable Jar File: I was editing some code in a Minecraft mod that ran as a JAR file. To edit the files inside I needed to extract the files, making the mod a windows folder. Now I can't figure out how to 're-compile' the folder into a JAR to run it. I used BreeZip to extract. submitted by...
  9. .jar File is not executed?

    in Windows 10 Network and Sharing
    .jar File is not executed?: Good day! I was about to run a .jar file using the Windows command prompt (cmd for short. The program is supposed to be a console program. You will find the mistake in the picture. [ATTACH] MfG Tomic .jar File wird nicht ausgeführt?
  10. Executing a .bat file on CMD

    in Windows 10 Support
    Executing a .bat file on CMD: Hello all, For a programming process we need to execute a .bat file from CMD. I'm on Windows 10 x64. When I paste the path to the file and hit Enter, the message below is expected to show up: Setting up environment for Qt usage... It happened a time and when we wanted to...