在批处理文件中调用java类 [英] call java class in batch file

查看:281
本文介绍了在批处理文件中调用java类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打电话给在批处理文件中的Java类。
我怎么能叫。能告诉我哪调用类的文件中的任何命令

i want to call the java class in batch file. how can i call. can tell me any commands which call the class file

谢谢
克里希纳

Thanks Krishna

推荐答案

如果你有一个MyClass类与包名com.mycomp.util那么你必须去COM,例如C的父目录: \\ SRC是包含COM组件然后将文件夹

if you are having a class Myclass with package name com.mycomp.util then you have to go to the parent dir of "com" for example "c:\src" is the folder that contains com package then

您的命令应该在批处理文件

your command should be in the batch file

CD C:\\ SRC
java命令jar1; jar2; com.mycomp.util.Myclass

cd c:\src java -cp jar1;jar2; com.mycomp.util.Myclass

现在调用批处理文件。

这篇关于在批处理文件中调用java类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆