You probably forgot the needed . in the classpath. Once you use
-cp path to get the jgraph.jar in the classpath, you also need .,
-cp path:. on UNIX, -cp path;. on Windows, where I'm assuming
your current dir is at the top of the .class directory system.
The reason is that . is the default classpath, but when you
override the classpath with -cp path, you need to put it back
in the new path explicitly.