Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 581
Ghanta Sairam Avatar asked Jun 20 '26 08:06

Ghanta Sairam


1 Answers

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.

like image 170
Luca Geretti Avatar answered Jun 22 '26 20:06

Luca Geretti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!