The paper is devoted to prove the existence of a local solution of the Hamilton-Jacobi equation in field theory, whence the general solution of the field equations can be obtained. The solution is adapted to the choice of the submanifold where the initial data of the field equations are assigned. Finally, a technique to obtain the general solution of the field equations, starting from the given initial manifold, is deduced.