• Register
0 votes
2.4k views

Problem :

I get the following error when I execute jar command in cmd.

'jar' is not recognized as an internal or external command, operable program or batch file.                       

I tried very hard to solve this problem by myself by putting the path of the jar.exe file in my "path" variable in My computer > > settings > advanced system settings > environment variables.

This is how i tried to fix my issue -

(my old path variables here)C:\Program Files (x86)\Java\jdk1.7\bin\jar.exe 

I properly saved all the changes and also tried to run jar in cmd prompt again and but I got the same error. 

Please let me know my mistake and how to fix it. I need to create jar files via the command line.

6 5 3
6,930 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

Following are the steps to solve this issue:

1.      Please check in your bin folder if  jar.exe is available or not

2.      Also look for your environmental settings

3.      Please download jar file from here and keep it in your bin folder

4.      now please check for jar it will 100% work

5.      Please note you need to keep any jar in your desktop and go to desktop path on cmd prompt and run the command jar xf filename.jar

6.      Now it will work.

9 7 4
38,600 points
0 votes

There are many reasons for encountering this error. Here we will discuss some solutions;

Solution 1:

  • The path that is provided by the user should only contain directories where the operating system can look for executable. First check your bin folder jar.exe is available or not. Strip the “\jar.exe” to set your path as;
(old path variables);C:\Program Files (x86)\java\jdk1.7\bin
  • Check for your environment variable settings.
  • Download the jar file from the following link and keep it in the bin folder;
  • http://originaldll.com/file/jar.exe/29248.html
  • Now check whether the jar is working 100% or not.
  • Keep any jar file in your desktop and go to the desktop path by using the cmd command prompt and the run the command;
jar xf filename.jar

Now see I hope it is working.

Solution 2:

If you cannot able to solve your error from the above method then use this one;

  • Create shortcut for C:\Program Files (x86)\Java\jdk1.7\bin\java.exe.
  • Open the C:\ProgramData\Oracle\Java\javapath. You can copy the address to file explorer or you can set it to show the hidden files.
  • Copy previously created a shortcut to the java path folder, by replacing the existing one. Make sure it named exactly java.exe.

 

11 5 2
3,890 points

Related questions

0 votes
1 answer 29 views
29 views
Problem: Hi: I am returning after a little break. I was examining and rehearsing Java these days routinely. I've enlisted myself in an online course to comprehend things in a superior manner. I believe it's helping me somewhat more. Anyway, today I've inquiry with respect to change in Java. I am understanding the java concept of internal and external command.
asked Nov 2, 2020 Mashhoodch 6.1k points
0 votes
1 answer 19 views
19 views
When the above error appear in the command prompt and reasons behind it?
asked Oct 6, 2020 jagruthi 680 points
0 votes
2 answers 306 views
306 views
Problem : When ever I run mvn --version command from inside the bin it gives me the version but when I run it from the outside of bin it gives following exception : 'mvn' is not recognized as an internal or external command, operable program or batch file.
asked Nov 18, 2019 peterlaw 6.9k points
0 votes
1 answer 1.3K views
1.3K views
Problem : I have encountered following keytool error 'openssl' is not recognized as an internal or external command, operable program or batch file.
asked Nov 13, 2019 peterlaw 6.9k points
0 votes
2 answers 52 views
52 views
Hello colleagues, I really want to know How To Solve 'python' is not recognized as an internal or external command, operable program or batch file error. Thanks
asked Oct 23, 2020 psandprop 2.4k points
0 votes
1 answer 29 views
29 views
I installed WAMP on my computer. After the installation, I created my first php file. I wanted to test it by using the command prompt. php test.php But I got this error instead. 'php' is not recognized as an internal or external command, operable program ... don’t know what’s wrong because I followed the tutorial on how to install WAMP. Any help and guide will be greatly appreciated.
asked Oct 11, 2020 azriel 590 points
1 vote
1 answer 1.3K views
1.3K views
Problem: I installed flask in my system by running the command: pip install flask Collecting flask Downloading https://files.pythonhosted.org/packages/f2/28/2a03252dfb9ebf377f40fba6a7841b47083260bf8bd8e737b0c6952df83f/Flask-1.1.2-py2.py3-none-any.whl (94kB) |████████████████████████████████| ... operable program or batch file. Whats the problem running this can any one tell me? Thanks in advance.
asked May 12, 2020 samhaz 5k points
0 votes
1 answer 85 views
85 views
I am new to python programming. I am using atom IDE or atom editor for my python programs but every time I try to run a code or a script from my atom editor it gives me an error like : atom 'python' is not recognized as an internal or external command, operable ... and atom for 64 bit windows. Can anyone figure out what the problem really is and how can I solve this problem and run my code.
asked Mar 10, 2020 LizzyM 6.1k points
0 votes
1 answer 1.3K views
1.3K views
Problem : I am new to type script and unable to compile my type script file. When I try to hit Ctrl+Shift+B in my VS Code, I face below error " ‘Tsc' is not recognized as an internal or external command, operable program or batch file." I used ... C:\Users\mphil\AppData\Roaming\npm\node_modules\typescript\bin\tsc C:\Users\mphil\AppData\Roaming\npm `-- typescript@2.1.5 How to fix above error?
asked Feb 15, 2020 mphil 2.3k points
0 votes
1 answer 1.6K views
1.6K views
Problem : I am beginner in the node.js .Currently I am trying to install node.js using the below command npm install nodemon --save. But when I try to run a server with below command nodemon server.js. then in my terminal I face below error: “Nodemon is not recognized as internal or external command, operable program or batch file”
asked Feb 13, 2020 mphil 2.3k points