[Bug] [Java] Main class cannot be found or cannot be loaded
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
一、--class-path这个参数在项目里面是写死的,但是对于使用JDK8的用户来说不太友好,因为JDK8没有这个option
二、打包好的jar包,明明在本地可以运行,但是在DolphinScheduler的Java组件里面却一直报错找不到或无法加载主类
三、使用jar运行类型,为什么选择了主程序包,还必须得选资源中心,不然就跑不起来,有点重复选择的感觉
What you expected to happen
java组件还不够友好,本来想着资源中心的东西可以复用,结果还是得用shell组件,然后定时把jar、sh放到每个worker上,太麻烦了
How to reproduce
去使用一下Java组件即可,并且资源中心的是用的HDFS存储。
Anything else
No response
Version
3.2.x
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
- The --class-path parameter is hard-coded in the project, but it is not very friendly to users using JDK8 because JDK8 does not have this option.
- The packaged jar package can obviously be run locally, but in the Java component of DolphinScheduler, it keeps reporting an error that the main class cannot be found or cannot be loaded.
- When using the jar running type, why do you choose the main package? You must also select the resource center, otherwise it will not run. It feels like a repeated selection.
What you expected to happen
The Java component is not friendly enough. I originally thought that the things in the resource center could be reused, but in the end I still had to use the shell component, and then put the jar and sh on each worker regularly. It was too troublesome.
How to reproduce
Just use the Java component, and the resource center uses HDFS storage.
Anything else
No response
Version
3.2.x
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
https://github.com/apache/dolphinscheduler/issues/15334 直接运行main函数,这个问题你有出现嘛?
#15334 直接运行main函数,这个问题你有出现嘛?
这个bug是文件下载的时候出现的,路径出现问题,导致它找不到主类,在Linux上,它把HDFS的完整路径给copy下了,HDFS路径带了两个//,并且还带有:号