工头找不到java [英] foreman can't find java

查看:241
本文介绍了工头找不到java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的Procfile看起来像这样


我正在尝试使用工头在本地运行一个java应用程序,

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

但是当我做 formeman开始我得到

  15:51:21 web.1 |未知命令:java $ JAVA_OPTS -cp target / classes; target / dependency / *开始

在提示符下输入 java ,我得到java的帮助文本,以便在我的路径上。如果我使用Procfile中的java可执行文件的完整路径,它可以工作,但是如果我不需要两个版本的Procfile,那么它会更干净。



是否有有时候我的路径还是工头没有得到我的环境的路径吗?

解决方案

可能是环境变量问题?



Windows:

  java%JAVA_OPTS%-cp目标/类;目标/依赖/ *开始

Linux:

  java $ JAVA_OPTS -cp target / classes:target / dependency / *开始

看起来这个例子是两者的混合: - )



环境变量


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?

解决方案

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

这篇关于工头找不到java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆