Skip to main content


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 17:11 Go to next message
Jim F is currently offline Jim FFriend
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 18:18 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Try putting quotes around them.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: run configs - path & file name arguments [message #899169 is a reply to message #899167] Mon, 30 July 2012 19:06 Go to previous message
Jim F is currently offline Jim FFriend
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 20: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 Apr 26 07:32:28 GMT 2024

Powered by FUDForum. Page generated in 0.27818 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top