Ibm j9 java.util.Executors ClassNotFound

50 Views Asked by At

I am developing an application using IBM j9 JDK. When I try to use the following line of code:

ExecutorService es = Executors.newSingleThreadExecutor();

I get a runtime exception saying NoClassDefFoundError for java.util.Executors

Is there a different way I can open a concurrent thread using ibm j9?

1

There are 1 best solutions below

0
Hugues M. On BEST ANSWER

Apparently you are running a pre-1.5 java version, so you'll need to adapt, perhaps with pre-1.5 util.concurrent library which has a QueuesExecutor.

Without library you could use a Thread and implement a thread-safe queue yourself.