• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to exit jar command  RSS feed

 
nirjari patel
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I execute jar command as follows. Everything I can see is command prompt blinking on next line to where cmd is executed as follows

C:\Program Files\Java\jdk1.6.0_25\bin>jar x

How can I exit this cmd now ? I tried q, Cctrl+q, esc, ctrl+x, etc. But its not working. I can type on the next line. What state is this and how to exit from here ?
C:\Program Files\Java\jdk1.6.0_25\bin>jar x "C:\Users\nm2t\Desktop\JavaTest\exam
ples.jar" C "C:\Users\nm2t\Desktop\JavaTest\TeamSite Jar Files\Jar Content\examp
les"
Even this cmd is hung.
This happened before also and I had to close console to exit. Is there a better way without closing console ?

Thanks


 
Greg Charles
Sheriff
Posts: 3015
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is that's an incomplete command. Generally, you'd want jar xvf MyJar.jar to extract files from a Jar file. If you've typed jar x by mistake and want to abort, Ctrl-C should do it. That's true of most commands actually.
 
nirjari patel
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. Yes ctrl+c did abort command.

I tried xvf as you advised. It does not give an error message, but it does not generate any output in "examples1" dir
C:\Program Files\Java\jdk1.6.0_25\bin>jar -xvf "C:\Users\nm2t\Desktop\JavaTest\TeamSite Jar Files\examples.jar" C "C:\Users\nm2t\Desktop\JavaTest\TeamSite Jar Files\Jar Content\examples\examples1"

Following execution again prints Usage detail message only.
C:\Program Files\Java\jdk1.6.0_25\bin>jar -xvf "C:\Users\nm2t\Desktop\JavaTest\TeamSite Jar Files\examples.jar" -C "C:\Users\nm2t\Desktop\JavaTest\TeamSite Jar
Files\Jar Content\examples\examples1"


So whats wrong in here ?

WHen I do redirection of output as below, I get access denied message
C:\Program Files\Java\jdk1.6.0_25\bin>jar -xvf "C:\Users\nm2t\Desktop\JavaTest\TeamSite Jar Files\examples.jar" > "C:\Users\nm2t\Desktop\JavaTest\TeamSite Jar Files\Jar Content\examples\examples1"
Access is denied.


Thanks
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!