I disagree. Simply use: (System/getProperty "user.home")
This will give you a useful path to work with, no matter where you start from. Works on my Mac. Should work on Windows. >From there I would build a simple library which tests which OS I am on, and gives me the paths to the conventional locations on each plattform for applications-support, prefs, caching, documents, desktop, etc. I.e. (cache-dir my-application-name). On 26 Aug, 13:35, Lee Spector <[email protected]> wrote: > On Aug 25, 2011, at 11:39 PM, Dave Ray wrote: > > > > > "user.dir" is the directory from which the JVM was launched, i.e. the > > initial working directory of the process. So, you're probably > > double-clicking the Clooj jar which resides in your Downloads folder > > and thus all further file system operations will be relative to that. > > Ah. Exactly right. That explains why. > > Thanks also for all of the other details and workaround suggestions on the > clooj list. Alas, the bottom line does seem to be that there's no simple way > to get simple file I/O to work relative to a project's location without > launching the JVM in a specific way. > > -Lee -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
