  The Casimir energy of a massless scalar field is semiclassically given by
contributions due to classical periodic rays. The required subtractions in the
spectral density are determined explicitly. The so defined semiclassical
Casimir energy coincides with that obtained using zeta function regularization
in the cases studied. Poles in the analytic continuation of zeta function
regularization are related to non-universal subtractions in the spectral
density. The sign of the Casimir energy of a scalar field on a smooth manifold
is estimated by the sign of the contribution due to the shortest periodic rays
only. Demanding continuity of the Casimir energy under small deformations of
the manifold, the method is extended to integrable systems. The Casimir energy
of a massless scalar field on a manifold with boundaries includes contributions
due to periodic rays that lie entirely within the boundaries. These
contributions in general depend on the boundary conditions. Although the
Casimir energy due to a massless scalar field may be sensitive to the physical
dimensions of manifolds with boundary, its sign can in favorable cases be
inferred without explicit calculation of the Casimir energy.
