简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM