1

I'm trying to use foreman to run a java app locally which deploys fine to heroku.

My Procfile looks like this

web: java $JAVA_OPTS -cp target/classes;target/dependency/* Start

but when i do formeman start i get

15:51:21 web.1  | unknown command: java $JAVA_OPTS -cp target/classes;target/dependency/* Start

If I just enter java at the prompt i get java's help text back so its on my path. If I use the full path to the java executable in the Procfile it works, but it'd be cleaner if I didn't need two versions of the Procfile

Is there somethinf funky going on with my path or is foreman not getting the path from my environment?

Chris Blackwell
  • 2,138
  • 17
  • 22

1 Answers1

1

Could it be the environment variable is the problem?

Windows:

    java %JAVA_OPTS% -cp target/classes;target/dependency/* Start

Linux:

    java $JAVA_OPTS -cp target/classes:target/dependency/* Start

Looks like the example is a mix of both :-)

Environment variable

  • I too am facing the issue describe in the Q and although this didn't help resolve the original problem (ended up using `%JAVA_HOME%\bin\java%`) ... it did help me fix all the others :) – pulkitsinghal Nov 15 '13 at 17:06
  • Glad to hear it :-) `%JAVA_HOME%\bin\java%` looks strange - why don't you leave the trailing sign? (`%JAVA_HOME%\bin\java`) – Snezhana Sapunkova Nov 18 '13 at 08:55