| 
| creating files in working directory [message #53483] | Mon, 18 April 2005 08:18 |  | 
| Eclipse User  |  |  |  |  | Originally posted by: david.photiczone.com 
 I am writing a code generator which I run as an application within
 eclipse.  I want the output files to be generated and placed inside the
 source tree of the current project.  If the root of my project is, say,
 c:\project, I want the source files to be in c:\project\x\y\src.  So that
 is the value I am trying to use as my working directory.  However it
 doesn't work.
 
 I have tried setting the working directory using the "user.dir" system
 property via Run/Run.../Arguments/VM Arguments.  I have also tried using
 the Run/Run.../Arguments/Working Directory field but neither works.  My
 generator uses java.io.File.mkdirs() to create all the intermediary
 directories and this keeps returning false, although some of the
 directories are created.
 
 However, if I set my working directory to c:\project, or leave is
 undefined (so that the default is used) it all magically works and the
 source files get created - albeit in a location that is of little use to
 me.
 
 Can anyone explain to me why this is failing?
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.09808 seconds