• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to handle space between C:\Document and Setting\

 
Kee Kee moon
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it is not just a windows command. I pass the argument into eclipse IDE window and I do use double quote. When the argument comes to the java program,
I still get errors. Apparently, the space cause the problem.

Thanks a lot.



Hi,

Please help.

I pass the argument C:\Document and Setting\...... I expect my java program to execute jar tf C:\Document and Setting\xxx\xxx\xxx.jar
However, there are spaces between C:\Document and Setting\.... and it fails to get the results.

How to resolve the issue?
Thanks in advance.
 
Paul Clapham
Sheriff
Pie
Posts: 20978
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a question about the Windows command line, not about Java. And in that shell, if you want a string which contains spaces to be treated as a single unit, you surround it by "quotes".
 
Paul Clapham
Sheriff
Pie
Posts: 20978
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't edit your question after people have answered it, it makes the answers to the original question look foolish.

As I don't like being made to look foolish, I leave it to other people to see if they dare to answer the new version of the question.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try:

jar tf "C:\Document and Setting\xxx\xxx\xxx.jar"

like Paul said in his first response to your post.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic