Is there a way to determine if all needed runtime dependencies for a Java application exist in the class path?
This is not possible in the general case, because it may be that the accessible class files do not contain all the necessary information. In particular, it is possible for an application to depend on classes that are identified to it only at runtime.
The java
command -- though not itself implemented in Java -- is illustrative: it accepts the name of the application's main class as a command-line argument. Therefore, what classes it will require cannot be statically determined; they depend on the command line arguments. Java programs can do similar, and such use is routine in certain areas. For example, JDBC drivers are often loaded reflectively by name, and it is common for the driver name to be recorded in a configuration file instead of hard-coded.
On the flip side, it is possible for classloaders to load classes from remote sources and to synthesize classes on the fly, so even if you don't see a particular class anywhere on the filesystem, it is difficult to be certain that it will not be available at runtime. And there are other fun classloader games that are sometimes played.
Now, for applications that are not subject to class loading considerations such as the above, it is possible, in principle, to determine all the needed classes by recursive examination starting with the application's main class, and to attempt to load all those classes to verify that they are available. Even then, however, it is possible to run into trouble with mismatched versions of classes, so that even though all the wanted (by name) classes are available, they do not work properly together.
So overall, the only sure way to perform an ex post facto determination such as you describe is to test all code paths, with all relevant data variations that can affect which classes are needed.