I am working through setting up a folder hierarchy for development and deployed operations of my B4J App. Ultimately, I will have a folder for templates (\templates), a folder for data (\data), and a folder for reports (\reports) etc.. How do i ensure this hierarchy works the same when under development in the IDE as when compiled and deployed?
I really like the idea that the compiled app can just be off of a thumb-drive without needing to be installed with registry entries etc. (It makes for simple and convenient running of the program on whatever pc you want). This means that the exe can reside anywhere and it simply runs.
With the additional footprint of the folder hierarchy, I am expecting that I simply need to put the executable in a folder that houses the hierarchy of folders and files used by the application and it too would run anywhere, the same, regardless of whether it was running under the developmental phase within the IDE or running anywhere else as a compile executable (in the folder with the additional folder hierarchy).
I am familiar with the special directories under the File object (File.DirAssets, including File.DirApp, File.DirData, and File.DirTemp) but these folders seem to spread my files out all over the drive (like "User\AppData\Roaming\MyApp" and a local "\Files directory" as so on.
Therefore, I am looking for the approach that keeps my executable along with a supporting folder hierarchy for data, templates, reports, etc. all within one overarching main folder AND it works the same under development within the IDE as it does when compiled and running within a folder on a thumb-drive.
\Top-level Folder
+---Jar file or exe app
+---\App Folder
+--------\Data Folder
+--------\Templates Folder
+--------\Reports Folder
Thoughts Anyone?
I really like the idea that the compiled app can just be off of a thumb-drive without needing to be installed with registry entries etc. (It makes for simple and convenient running of the program on whatever pc you want). This means that the exe can reside anywhere and it simply runs.
With the additional footprint of the folder hierarchy, I am expecting that I simply need to put the executable in a folder that houses the hierarchy of folders and files used by the application and it too would run anywhere, the same, regardless of whether it was running under the developmental phase within the IDE or running anywhere else as a compile executable (in the folder with the additional folder hierarchy).
I am familiar with the special directories under the File object (File.DirAssets, including File.DirApp, File.DirData, and File.DirTemp) but these folders seem to spread my files out all over the drive (like "User\AppData\Roaming\MyApp" and a local "\Files directory" as so on.
Therefore, I am looking for the approach that keeps my executable along with a supporting folder hierarchy for data, templates, reports, etc. all within one overarching main folder AND it works the same under development within the IDE as it does when compiled and running within a folder on a thumb-drive.
\Top-level Folder
+---Jar file or exe app
+---\App Folder
+--------\Data Folder
+--------\Templates Folder
+--------\Reports Folder
Thoughts Anyone?
Last edited: