rest - 在 Heroku 上部署带有参数的 jar 文件
问题描述
我正在尝试在 Heroku 上部署一个接收两个参数的 jar 文件。
为此,我执行以下操作:
heroku create appname
heroku deploy:jar rest/target/rest-1.0-jar-with-dependencies.jar
但是我收到一条错误消息,指出未指定参数:
app [web.1]: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
app [web.1]: at org.dbpedia.spotlight.web.rest.Server.main (Server.java:86)
原来的jar运行如下:
java -jar rest-1.0-jar-with-dependencies.jar es http://localhost:2222/rest/
第一个参数是文件夹,第二个参数是REST服务的监听地址。
如果有人知道如何做到这一点,我将不胜感激。
提前致谢。
解决方案
推荐阅读
- memory - 如何找到在 Linux 环境中可用的用户空间内存量?
- amazon-web-services - 没有与主机名关联的地址 - Kubernetes Pod 内部
- javascript - 使用 React-dnd 的 MUI 树视图
- python - 如何在我的 while 循环中继续我的 try/catch
- ef-fluent-api - EF Core:实体更新因布尔而失败?数据库中具有默认约束的属性
- php - 在 PHP 和 MySQL 中选择两个日期和两个表
- c# - 使用manualResetEvent的死锁 - c#
- java - 在 mariadb 中插入双引号时出错
- java - Apache Flink 1.14.0 - 提交作业时出错
- python - 分箱如何在 pandas 数据框中工作,如何根据 Python 中的百分位数对数据集进行分类?