Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
Try putting quotes around them.
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
Eclipse UserFriend
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] by Moderator

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


Current Time: Tue Jul 22 18:36:07 EDT 2025

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

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

Back to the top