验证 jar 包是否可以 运行 (test success)-- 为了解决 JVM not found 的报错
来源:互联网 发布:淘宝无线端详情页尺寸 编辑:程序博客网 时间:2024/05/16 19:51
最近客户要求装一个tscm 的软件,提供的是一个jar 包, 我设好 os 的java 的path 和java_home 变量,
java 的version 是64 位的,os aix也是64位的:
bootinfo -K
64
试了很多方法,总是报: JVM not found 的错误,觉得提供的jar 包有问题,下面进行测试:
方法是,写一个java 和可执行source ,然后打包成 jar 的形式,让起运行。测试成功:
step1:
To set class path:
export CLASSPATH=$CLASSPATH:/dd2:/greetings
step2:
2.1 create the folder:
mkdir /greetings
edit the java source:
more">root@a05gcpgdb02/greetings>more Hello.java
package greetings;
public class Hello {
public static void main(String[] args) {
for (int i=0; i< args.length; i++) {
System.out.println("Hello " + args[i]);
}
}
}
step3:
To compile the source into .Class file
cd ../
use command :javac greeting/Hello.java
step4:
run: java greetings.Hello parameter_1 parameter_2
result:
Hello paramter_1
Hello Parameer_2
--------------
step5:
cd /dd2
vi manifest.mf
Main-Class: greetings.Hello (please ensure enter "\n" end)
step6:
cd /dd2
compress the Class file into Jar file:
jar cvfm Hello.jar manifest.mf /greetings
step7:
cd /dd2
run the compressed file:
java -jar Hello.jar parameter_1 parameter_2
get the same reault as before:
Hello paramter_1
Hello Parameer_2
- 验证 jar 包是否可以 运行 (test success)-- 为了解决 JVM not found 的报错
- intelliJ idea运行新的test功能时,报错:class not found "....." empty test suite
- Juint 单元测试,必需要的jar,处理Class not found com.test.CalculateTest报错
- 添加第三方jar包,class not found的解决
- Pycharm添加包后运行报错module not found
- 由maven依赖的jar包有误导致tomcat运行报错的一种解决思路
- Android studio运行单元测试报错: Class Not Found: Empty Test Suite
- SpingMVC项目导入jar包运行报错,编译不报错的解决方式
- SSH整合 项目启动突然报错 log4j listener 找不到jar包 class not found
- jar包无法运行——could not find the main class...(java -jar *.jar可以运行,jar包不可以打开的解决方法)
- Spring导出可以运行的jar包
- maven报错Fatal error compiling: tools.jar not found错误的问题处理
- springmvc报404Not Found /WEB-INF/jsp/success.jsp was not found on this server.
- 监控运行中jar包的jvm信息
- JAVA_jar包运行时的Class not found异常
- 运行Java命令行报错 class not found
- Xcode运行工程报错-Reason: image not found
- 制作双击可以直接运行的jar包
- 解题笔记(19)——数对之差的最小值
- 用户的习惯就是最真切的需求,用户的需求就是我们的工作内容。
- 将本地服务器数据更新到服务器
- timesten处理事务锁
- 让editplus不再生成.bak文件
- 验证 jar 包是否可以 运行 (test success)-- 为了解决 JVM not found 的报错
- linux socket 解析 & demo
- VTL的市场应用环境
- 通过包名打开另外一个应用程序和获取手机中已安装apk文件信息(PackageInfo、ResolveInfo)
- SQL SERVER 2005 同步复制技术
- Myeclipse6.5注册码汇集(收录网上的注册码和注册算法)
- windows ftp批处理
- Android FrameWork——StatusBar
- Iphone 开发常用代码