# Not able to load the package in CDF

I am facing a problem in loading the package. My code is working in Mathematica but after deploying it into CDF, it is unable to load the package and shows error.

The code was not even working in Mathematica when I evaluated it for the first time but when I evaluated it one more time it worked.

I got help from this stackexchange question

And now it is working in Notebook but not in CDF, after relaunching the Mathematica Kernel.

-

As I understand, three things are needed:

• Explicitly list the contexts of the functions that are in the package. For example, if you are using the function f in package test call it testf[] instead of just f[].

• Call Needs on the package inside the initialization option for the Manipulate that makes up your CDF. I would recommend calling needs with the syntax that gives the full file path to the package. For example: Initialization->{Needs["Plambda","filepathhere"]}

• Place the package inside the installation directory for CDFPlayer under AddOns\Applications. For example under windows:

C:\Program Files\Wolfram Research\Wolfram CDF