在Windows 7上运行Bash(.sh)(Run Bash(.sh) on Windows 7)
这是一个GUI java应用程序,我有一个run.sh文件,我想在Windows 7(x64)上运行它如何制作它?
该文件包含以下行:
#!/bin/bash java -Xmx2048m -classpath ./lib/*: com.jweb2.JWMainWindow &> out.txt我从Java安装JDK,JRE和Cygwin( http://www.cygwin.com/ ),但没有任何帮助。
谁知道?
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.txtI install JDK, JRE from Java, and Cygwin (http://www.cygwin.com/) but did not help anything.
Who knows?
最满意答案
它只是一个java命令。 将其转换为Windows批处理( .bat )文件。
run.bat文件应该包含。
SET CPATH="" FOR /F %%r in (.\lib\*) DO SET CPATH="%CPATH;%%r" java -Xmx2048m -classpath %CPATH com.jweb2.JWMainWindow > out.txt 2>&1如果你的java命令在%PATH%它应该工作
我现在无法访问Windows机器。 所以可能会有错误。
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>&1It should work if your java command is in %PATH%
I dont have access to windows machine right now. So there could be mistakes.
更多推荐
发布评论