how to run java .class file from an autohotkey script?

拟墨画扇 提交于 2019-12-07 13:00:02

问题


How to run java .class file from a script providing some command line parameters? The script is built using autohotkey framework. Can we trigger the execution of .class files from a script? Please let me know if I am wrong.


回答1:


I am not familiar with autohotkey, but if your command line is something like

java -cp <yourclasspath> <yourclassname> <yourarguments>

you are good to go, I guess.

ADDITION:

It seems to me that the Run directive allows you to do that. Assuming to have your MyClass.class file (with MyClass in the default package) in C:\mypath, I expect you have to issue something like

Run,java -cp . MyClass,C:\mypath

I am not able to verify the above line, since I do not have a Windows installation at hand.



来源:https://stackoverflow.com/questions/11014479/how-to-run-java-class-file-from-an-autohotkey-script

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!