I apologies if this has been answered already; my search did not revealed any one.
I have a play application deployed on Heroku. I also have another Worker class with main method in the same build. I want to run that class as a worker and not web. When I try to run it it gives me ClassDefNotFound exception which is obvious because I am not providing classpath for this process.
How do I figure out what should be the classpath (jars and classes both)? Or is there any other way of doing this?
Reason to put that class separate worker process is to scale it independent of web application.
Here is more detail. My Procfile has following entries,
web: target/start -Dhttp.port=$PORT -DapplyEvolutions.default=true -DapplyDownEvolutions.default=true -Ddb.default.url=$DATABASE_URL ${JAVA_OPTS}
worker: target/start com/company/test/worker/WorkerApplication ${JAVA_OPTS}
worker entry has only the name of the class "WorkerApplication" which needs to be run but Heroku is unable to find these class files and other dependencies.