I'm using a java process to spawn many other java processes using Runtime.exec(cmd)
where cmd is like the following:
java -cp "MyJar.jar" pkg.MyClass some-more-arguments
running the same command from the command line works fine in windows and linux, however when my spawning java process calls the command via Runtime.exec
it works in windows but not in linux.
in linux i get Exception in thread "main" java.lang.NoClassDefFoundError: pkg/MyClass
any ideas?