"Registering" an application

Lennart Öhman <>
Thu Aug 1 22:56:22 CEST 2002


Hi Björn,

first, the general idea is that the application directory shall be name-version.
E.g foo-1.0. The version may actually be any string acceptable to the file
system.

As you correctly found out, a correct .app file must exist for the application
controller to understand what to do when you try application:start/1.
But the application controller uses the code-path, kept by the code-server to
locate .app files (and the code-server will then also use the code-path to load
the modules).

See the man-page for the code module, especially code:patha.

You do not have to register the application in any specific way, other than that
you can build releases pointing out certain versions of certain applications.
You can then build boot-scripts starting that particular release.

/Lennart


Björn Bylander wrote:
> 
> Hello,
> 
> I've created an application, foo, with a supervisor, gen_server etc
> according to the design principles. I've also created a directory
> structure for the application:
> f:\code\foo\ebin
> f:\code\foo\src
> f:\code\foo\include
> f:\code\foo\priv
> I've put all of the erl files in the src directory and an foo.app file
> in ebin.
> 
> How do I "register" my app with the erlang system so that I, while
> developing, can start it with "application:start(foo)"?
> Right now, all I get is "{error,{"no such file or directory","foo.app"}}".
> 
> TIA,
> Björn

-- 
-------------------------------------------------------------
Lennart Ohman                   phone   : +46-8-587 623 27
Sjoland & Thyselius Telecom AB  cellular: +46-70-552 6735
Sehlstedtsgatan 6               fax     : +46-8-667 8230
SE-115 28 STOCKHOLM, SWEDEN     email   : 



More information about the erlang-questions mailing list