|
From: Gesly G. <ges...@gm...> - 2007-11-05 21:26:33
|
Hi, My Java app (Jar1.MainClass) calls Rumtime.exec() to execute another java app (jar2.MainClass). This works when I run the app from the command line (hence I would assume my Rumtime.exec() is working properly). It successfully execs the new process. But when I wrap the app (inside the java service wrapper, the app ( jar1.MainClass) starts up fine, but the Rumtime.exec() fails. My app gets a NoClassDefFoundError on the call to the Runtime.exec() - Its not able to find the main class of the process that my App is trying to exec(). What intrigues me if how does wrapping my app in a service differ from running the app from the command line. The service is not failing since it runs my app (jar1.MainClass), but somehow it fails on the exec. I have tried the following: - Since my path includes a network drive, I thought the problem might be related to security - so I run the service as a permissioned user instead of the default system user. - Since this could be a classpath problem I added the jar to wrapper's classpath in the conf file. I searched the website, but could not find something that would help me solve the problem. It would be great if any of you have a suggestion for this. Thanks Gesly |