javaw和* Could not find the main class. Program will exit!
来源:互联网 发布:处cp什么意思网络用语 编辑:程序博客网 时间:2024/04/27 00:50
今天部署工程在调用javaw命令时出个怪异常, Could not find the main class. Program will exit!
文件夹myProject下有三个jar文件: a.jar,b.jar,c.jar和一个批处理文件: s.bat
主函数在 a.jar文件里.
在批处理文件里输入了如下命令: java -cp *; com.pro.Main
程序运行正常!!!
但将java改成javaw然后点击批处理,就弹出一个对话框提示错误:Could not find the main class. Program will exit!
在网上搜索一些常见的解决方法都不行,.mf文件也改了!错误一样!
后来发现输入命令javaw -cp a.jar com.pro.Main程序可以启动!当然没有加载其他的依赖包,程序本生会有异常!
于是把问题锁定到命令格式上!怀疑javaw -cp 后的jar路径里不支持*通配符.
最后把批处理文件改成: javaw -cp a.jar;b.jar;c.jar com.pro.Main
启动程序,一切正常!
文件夹myProject下有三个jar文件: a.jar,b.jar,c.jar和一个批处理文件: s.bat
主函数在 a.jar文件里.
在批处理文件里输入了如下命令: java -cp *; com.pro.Main
程序运行正常!!!
但将java改成javaw然后点击批处理,就弹出一个对话框提示错误:Could not find the main class. Program will exit!
在网上搜索一些常见的解决方法都不行,.mf文件也改了!错误一样!
后来发现输入命令javaw -cp a.jar com.pro.Main程序可以启动!当然没有加载其他的依赖包,程序本生会有异常!
于是把问题锁定到命令格式上!怀疑javaw -cp 后的jar路径里不支持*通配符.
最后把批处理文件改成: javaw -cp a.jar;b.jar;c.jar com.pro.Main
启动程序,一切正常!
- javaw和* Could not find the main class. Program will exit!
- Could not find the main class. Program will exit
- could not find the main class. Program will exit.
- Could not find the main class. Program will exit...
- Could not find the main class. Program will exit
- Could not find the main class.Program will exit.
- Could not find the main class. Program will exit.
- junit:could not find the main class Program will exit
- [Eclipse] Could not find the main class. Program will exit
- could not find the main class : program will exit
- Could not find the main class. Program will exit
- 【解决方法】Could not find the main class Program will exit
- Could not find the main class Program will exit
- Could not find the main class: *****.Program will exit
- Could not find the main class. Program will exit.
- Could not find the main class ***.Program will exit
- Could not find the main class. Program will exit.
- Could not find the main class. Program will exit
- 供应微软简包
- TV,AV,HDMI,DVI接口介绍
- 透不过气
- CBR,VBR,ABR介绍
- 丁磊:那时候我们除了会写软件 什么也不会做
- javaw和* Could not find the main class. Program will exit!
- Hooking into NDIS and TDI-part 1
- 自己写的加密字符串、数字、日期的类(VB.net)
- css学习笔记(1)加入方法 文本属性 颜色和背景
- 《Pro Spring》学习笔记之声明式事务
- AOP的四种主要Java实现方式
- Struts原理与实践
- Hibernate Gossip: 複合主鍵(二)
- .Net 2.0 新功能:Parital Classes(分部类)