Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Bash(.sh) on Windows 7

This is a GUI java application, I have a run.sh file and I want to run it on Windows 7(x64) how to made that?

The file have this rows:

#!/bin/bash

java -Xmx2048m -classpath ./lib/*: com.jweb2.JWMainWindow  &> out.txt

I install JDK, JRE from Java, and Cygwin (http://www.cygwin.com/) but did not help anything.

Who knows?

like image 273
Johnny Avatar asked Apr 01 '26 17:04

Johnny


1 Answers

Its just a java command. Convert it to a windows batch (.bat) file.

run.bat file should contain.

SET CPATH=""
FOR /F %%r in (.\lib\*) DO SET CPATH="%CPATH;%%r"
java -Xmx2048m -classpath %CPATH com.jweb2.JWMainWindow  > out.txt 2>&1

It should work if your java command is in %PATH%

I dont have access to windows machine right now. So there could be mistakes.

like image 55
Shiplu Mokaddim Avatar answered Apr 03 '26 09:04

Shiplu Mokaddim



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!