java - 运行 jar 文件时出现 ArrayIndexOutofBoundsException
问题描述
我有一个要运行的 jar 文件。我最初是在批处理脚本中运行它,但现在我想将它作为 shell 脚本运行。(我没有写这段代码,所以我无权访问主类)
我的 jar 文件名为 MyFile.jar,我正在使用
java -jar MyFile.jar
但是,我收到一条错误消息:
ArrayIndexOutofBoundsException: Index 0 out of bounds for length 0
这是我得到的唯一错误。
在批处理脚本中,文件使用
java -cp MyFile.jar com.mycomapnny.example.Main "path of where to put output"
我认为这与需要争论有关。但是我不确定要传递什么参数,因为我看不到主类。
任何帮助,将不胜感激。我可以尝试提供任何其他信息。
解决方案
推荐阅读
- python - 如何使用 dynamic_rnn 获取多层 RNN 中每一步和每一层的状态
- plotly-dash - 在单击按钮上破折号打开 tkinter 文件选择对话框
- xpath - 使用 Google Sheets import xml 从 XML 中提取子类别信息
- azure - azure-pipelines.yml 指南
- java - 变量的值在 Parcelable 对象的构造函数之外丢失
- google-sheets-api - 我只需要将总日期转换为月份
- php - 如何显示员工的休假到期日期
- python - 使基于 SpaCy 规则的匹配运算符变得贪婪
- python - 如何使用 SymPy 提取雅可比多项式的系数
- python-3.x - 将字节解码为文本和比较有问题吗?