[英]Run jar on IBM i (as400 / iSeries)
I'm working with IBM i (often called an AS/400 server). 我正在使用IBM i(通常称为AS / 400服务器)。
Currently I have been able to create .CLASS
files and run perfectly 目前我已经能够创建
.CLASS
文件并完美运行
in as400 Directory (I think it's called IFS or something like) a have my tree like: 在as400目录(我认为它被称为IFS或类似的东西)a我的树像:
/
+--Javacfd/
+--bin/
+--com/
+---company/
Class1.class
Class2.class
Hello.class
Server.class
+---other/
Other.class
Another.class
Etc.class
When I run RUNJVA CLASS('com.company.Hello')
Works well! 当我运行
RUNJVA CLASS('com.company.Hello')
效果很好! Or RUNJVA CLASS('com.company.other.Other')
或
RUNJVA CLASS('com.company.other.Other')
Now I need run a executable jar 现在我需要运行一个可执行jar
In windows java -jar my-jar.jar
Works well 在windows
java -jar my-jar.jar
良好
I as400 I tried 我尝试了as400
RUNJVA CLASS('hello.Application') CLASSPATH(':\Javacfd\bin\my-jar.jar')
I get 我明白了
Exception in thread "main" java.lang.NoClassDefFoundError: hello.Application 线程“main”中的异常java.lang.NoClassDefFoundError:hello.Application
RUNJVA CLASS('hello.Application') CLASSPATH('Javacfd\bin\my-jar.jar')
I get 我明白了
Exception in thread "main" java.lang.NoClassDefFoundError: hello.Application 线程“main”中的异常java.lang.NoClassDefFoundError:hello.Application
RUNJVA CLASS('hello.Application') CLASSPATH('\Javacfd\bin\my-jar.jar')
I get 我明白了
Exception in thread "main" java.lang.NoClassDefFoundError: hello.Application 线程“main”中的异常java.lang.NoClassDefFoundError:hello.Application
RUNJVA CLASS('hello.Application')
I get 我明白了
Exception in thread "main" java.lang.NoClassDefFoundError: hello.Application 线程“main”中的异常java.lang.NoClassDefFoundError:hello.Application
Note hello
is package and Application
is a Main class. 注意
hello
是包, Application
是Main类。 Jar file is locale in \\Javacfd\\bin\\my-jar.jar
Jar文件是
\\Javacfd\\bin\\my-jar.jar
语言环境
I'm doing wrong? 我做错了?
Assuming the jar contains a proper manifest you specify the jar file on the RUNJVA command CLASS parameter: 假设jar包含正确的清单,您可以在RUNJVA命令CLASS参数上指定jar文件:
RUNJVA CLASS('/Javacfd/bin/my-jar.jar')
You can also use the standard java tools and utilities through the Qshell interpreter: 您还可以通过Qshell解释器使用标准的java工具和实用程序 :
QSH CMD('java -jar /Javacfd/bin/my-jar.jar')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.