Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » run configs - path & file name arguments
run configs - path & file name arguments [message #899156] Mon, 30 July 2012 13:11 Go to next message
Jim F is currently offline Jim F
Messages: 3
Registered: July 2012
Junior Member
I'm having what I hope is a basic problem. I'm using Java and trying to enter a path and/or file name as a run configuration argument. The problem is that if the file name, or the path, has any spaces in it I get an IO Exception as in

Error - java.io.FileNotFoundException:

A small example illustrating the problem is:

c:\folderpath\filename.ext (this works)
c:\folderpath\file name.ext (but this fails if there's even one space anywhere)

is this something I need to set a variable for in eclipse (to handle spaces in input arguments), or...?

Thanks, any help is appreciated.
Re: run configs - path & file name arguments [message #899167 is a reply to message #899156] Mon, 30 July 2012 14:18 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2238
Registered: July 2009
Senior Member
Try putting quotes around them.

---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: run configs - path & file name arguments [message #899169 is a reply to message #899167] Mon, 30 July 2012 15:06 Go to previous message
Jim F is currently offline Jim F
Messages: 3
Registered: July 2012
Junior Member
Thank You!!! That worked!!! Very Happy

I thought it had to be something simple, but that's one thing I hadn't tried since all the other arguments I've entered (for other programs) were without quotes. I'm not sure why this is different.

I even tried using a file & folder prompt (e.g. ${file_prompt}) thinking it would be smart enough to handle it, but no luck. Any thoughts on how that one works? Very Happy

[Updated on: Mon, 30 July 2012 16:33]

Report message to a moderator

Previous Topic:My Java program won't run, please help.
Next Topic:Syntax Coloring in JSP Scriptlets.
Goto Forum:
  


Current Time: Fri Aug 01 20:42:02 EDT 2014

Powered by FUDForum. Page generated in 0.07087 seconds