[Supervisor-users] Custom classpath for java?

Roger Hoover roger.hoover at gmail.com
Tue Oct 20 12:49:13 EDT 2009


Looks like you want shell expansion.  I think running /bin/sh should do it.

[program:JavaServer]
command=/bin/sh -c '/usr/bin/java -cp $CLASSPATH:/var/jar/server.jar
server.JavaServer'

On Tue, Oct 20, 2009 at 2:47 AM, Phillip Oldham <phill at activityhq.com>wrote:

> Tres Seaver wrote:
> > Phillip Oldham wrote:
> >
> >> Is it possible to pass in a custom class-path for java programs when
> >> defining the program in a supervisord.conf file, other than doing `java
> >> -cp ...`?
> >>
> > You can set keys into the child process' environment, as documented here:
> >
> >  http://supervisord.org/manual/current/configuration.html#programx
> >
> According to the docs:
>
>    **Note** that the subprocess will inherit the environment variables of
>    the shell used to start "supervisord" except for the ones overridden
> here.
>
> That doesn't seem to be happening. When I configure the following:
>
> [program:JavaServer]
> command=/usr/bin/java -cp $CLASSPATH:/var/jar/server.jar server.JavaServer
>
> - then boot the process, the logs show that the $CLASSPATH variable
> isn't loading properly. Running that command directly on the commandline
> starts the server as expected.
>
> Is there something I'm missing or doing wrong?
> _______________________________________________
> Supervisor-users mailing list
> Supervisor-users at lists.supervisord.org
> http://lists.supervisord.org/mailman/listinfo/supervisor-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.supervisord.org/pipermail/supervisor-users/attachments/20091020/53e1b803/attachment.htm 


More information about the Supervisor-users mailing list