I have the following text in a BAT files so I java program in windows. I wa开发者_开发百科s 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
- get rid of the quotations - spaces in linux are not a usual practice, so the quotes are not needed
- change
;
to:
as classpath separator - change slashes to
/
- make the file
.sh
that should be it.
The options to java
and javac
are the same on all platforms. The only things that will change are the file path, for eg. deps\mail.jar
might become deps/mail.jar
; and the classpath separator, :
(colon) instead of ;
(semicolon).
check if java SDK (java-1.6.0-openjdk-devel or Sun) exists and in the PATH
which javac
Next put the same options
javac -sourcepath ..
精彩评论