That's an interesting question, and I guess it boils down to "how does the interpreter locate relevant .jproj files"?
If I look at all of J's .ijs files for those which reference '.jproj' one in particular stands out: stdlib.ijs And, if I look at J's system/main/stdlib.ijs for how .jproj gets referenced, I see: ProjExt=: '.jproj' and p=. (, '/' , ProjExt ,~ spath) each subdirtree y Studying these clues in stdlib.ijs, the names I see being used here are: FolderIds FolderTree getfolderdefs setfolder And that's as far as it goes there. But they're also used in system/util/project.ijs and presumably it's also possible to use an absolute path to reference a project. I see two verbs mentioned which presumably take a project reference -- when I look at https://code.jsoftware.com/wiki/Guides/Folders_and_Projects#Project_Verbs -- but the single example there does not take advantage of the above FolderTree (or FolderIds) structure. So, I would guess that the enumeration of projects under system and user folders is mostly only for the J IDE. In jqt, that would be the Project > Open menu option. (And, in that Project menu, 'New' should probably be 'New...' and 'Open' should probably be 'Open...' as traditionally we put a trailing ellipsis on menu options which bring up a dialog). Or, to make a long story short: If you want to open a project from the J IDE, you'll need to put it under a folder which J manages. -- Raul On Sat, Mar 4, 2023 at 7:32 AM Thomas Bulka <[email protected]> wrote: > > Hi Forum, > > I studied the guide about folders and projects in the wiki and it kind > of confused me > (https://code.jsoftware.com/wiki/Guides/Folders_and_Projects). > > It says "A project is a subdirectory of a folder that contains a file > with extension .jproj with the same name as the directory." Fine. > > Folders have been introduced together with the nouns SystemFolder_j_ and > UserFolders_j_ which J creates upon installation. Also fine. > > I'm not sure about the conclusion, though. Is it mandatory, that project > directories are children of the folders specified in UserFolders_j_? Or > is it at least discouraged to create a J project in an arbitrary > directory which is not part of the folder hierarchy already known to J? > > Or, to put it in another way: What is the recommended way to create a J > project in a directory outside of the /home/user/j9.4-user/projects > hierarchy? > > Sorry for this most likely trivial question, but somehow I'm not able to > figure out the connection between folders and directories. > > Thanks in advance! > > Regards, > > Thomas > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
