Search code examples
erlangerlang-otp

OTP application:load doesn't load a new compiled code


I've compiled my app, then load it:

application:load(my_app).
application:start(my_app).

Then unload:

application:stop(m_app).
application:unload(my_app).

Then recompile applcation by running build script from an other shell, check that there new files exists in ebin. Then try to start my app again:

application:load(my_app).
application:start(my_app).

And I've got the old code running.

How to renew my application code without quiting and restarting erlang?


Solution

  • Your code is cached. From shell you can type:

    l(<name_of_changed_module>).
    

    http://www.erlang.org/doc/man/c.html#l-1