在Windows 7上运行Bash(.sh)(Run Bash(.sh) on Windows 7)

编程入门 行业动态 更新时间:2024-10-22 20:42:00
在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.txt

I 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>&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.

更多推荐

本文发布于:2023-08-05 04:51:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1427574.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Bash   Windows   Run   sh

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!