permaculture playing cards*
The moose likes Beginning Java and the fly likes A problem about JDK tools java or javaw... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "A problem about JDK tools java or javaw... " Watch "A problem about JDK tools java or javaw... " New topic
Author

A problem about JDK tools java or javaw...

Ruigao Tang
Greenhorn

Joined: Jul 26, 2007
Posts: 9
Hi ranchers.
I want to use java.exe or javaw.exe to run a JAR file just like this

java -jar C:\AAA\file.jar

It worked

But it not worked if the folder name is "A A" a space between 2 'A', like

java -jar C:\A A\file.jar

a error: "Unable to access jarfile c:\A"

Is that means we cant use the two commands if there are spaces in folder name?
Thank you!

The JDK's version is 1.6 update 6
[ July 03, 2008: Message edited by: Ruigao Tang ]

SCJP: Certified SCJD: Certified SCEA: One day...
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

You need to run it as java -jar C:\"A A"\file.jar (Notice the quotes around A A)


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ruigao Tang
Greenhorn

Joined: Jul 26, 2007
Posts: 9
Thanks for your advice
But it worked like this

java -jar C:\\"A A\\"\file.jar
 
jQuery in Action, 2nd edition
 
subject: A problem about JDK tools java or javaw...
 
Similar Threads
how to look for jar file content in linux?
file.jar
Problem running jar on new Windows 7 install
Setting java -classpath to the Class-Path: element of an executable jar MANIFEST.MF file
"Fatal exception occurred. Program will exit."