I have a program which creates an ExecutorService object with Executors.newSingleThreadScheduledExecutor()
I then submit two jobs to this using scheduleWithFixedDelay method.
The first task checks some value in the registry using com.ice.jni.registry and the second runs some commands with commons.exec
If I run the program with the two jobs together if freezes after about two cycles.
If I run the program with either of the jobs running on there own the program runs fine.
There is no common code between the two jobs.
How do I go about debugging this problem?
If I create another thread which is separate to the ExecutorService it stops running as well when the ExecutorService freezes.
Run it on Debug mode in some IDE like Eclipse. Then, once the application is frozen (as reported in your comment), pause the relevant threads and check their call stack. This should give you an idea about any possible deadlocks.