3

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

Eric
  • 33
  • 2

3 Answers3

2
  • 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.

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
0

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).

casablanca
  • 69,683
  • 7
  • 133
  • 150
0

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

Sergei Chicherin
  • 2,031
  • 1
  • 18
  • 24