将 Windows Java 命令转换为 Linux Java 命令?
我在 BAT 文件中有以下文本,因此我在 Windows 中进行 java 程序。我想知道如何在 Linux 中做到这一点。
文件 1:
"C:\Program Files (x86)\Java\jdk1.6.0_23\bin\javac.exe" -sourcepath src -classpath bin;deps\jml-1.0b3-full.jar;deps\mail.jar -d bin src/*.java
文件 2:
"C:\Program Files (x86)\Java\jdk1.6.0_23\bin\java.exe" -Xmx1536m -classpath bin;deps\jml-1.0b3-full.jar;deps\mail.jar HelloWorld
如果有人能将它们转换为 Linux 命令,我真的很感激。
谢谢:D
I have the following text in a BAT files so I java program in windows. I was wondering how you can do this in linux.
File 1:
"C:\Program Files (x86)\Java\jdk1.6.0_23\bin\javac.exe" -sourcepath src -classpath bin;deps\jml-1.0b3-full.jar;deps\mail.jar -d bin src/*.java
File 2:
"C:\Program Files (x86)\Java\jdk1.6.0_23\bin\java.exe" -Xmx1536m -classpath bin;deps\jml-1.0b3-full.jar;deps\mail.jar HelloWorld
Id really appreciate it if someone would convert those to linux commands.
Thanks :D
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
:
作为类路径分隔符/< /code>
.sh
。创建应该是的
;
to:
as classpath separator/
.sh
that should be it.
java
和javac
的选项在所有平台上都是相同的。唯一会改变的是文件路径,例如。deps\mail.jar
可能会变成deps/mail.jar
;和类路径分隔符:
(冒号)而不是;
(分号)。The options to
java
andjavac
are the same on all platforms. The only things that will change are the file path, for eg.deps\mail.jar
might becomedeps/mail.jar
; and the classpath separator,:
(colon) instead of;
(semicolon).检查 java SDK(java-1.6.0-openjdk-devel 或 Sun)是否存在,并在 PATH 中
添加相同的选项
javac-源路径..
check if java SDK (java-1.6.0-openjdk-devel or Sun) exists and in the PATH
Next put the same options
javac -sourcepath ..