1、選擇Tools->preferences->User tools->Add Tool->Program
2、參數如下:
Menu text: javac
Command: javac
Argument: $(FileName) 選擇文件名
Initial directory: $(FileDir)
--java工具------------------------------------------
1、選擇Tools->preferences->User tools->Add Tool->Program
2、參數如下:
Menu text: java
Command: java
Argument: $(FileNameNoExt) 選擇無后綴文件名
Initial directory: $(FileDir)
--ant工具-----------------------------------------------
1、選擇Tools->preferences->User tools->Add Tool->Program
2、參數如下:
Menu text: ant_compile
Command: ant
Argument: -f $(FileDir)/build.xml compile
3、build.xml
- <? xml ? version = "1.0" ?> ??
- < project ? name = "struts" ? basedir = "." ? default = "" > ??
- ???? < path ? id = "classpath" > ??
- ???????? < fileset ? dir = "lib" > ??
- ???????????? < include ? name = "*.jar" /> ??
- ???????? </ fileset > ??
- ???????? < pathelement ? path = "." /> ??
- ???? </ path > ??
- ??
- ???? < target ? name = "compile" ? description = "Compile?all?source?code" > ??
- ???????? < javac ? destdir = "classes" ? debug = "true" ??
- ???????????? deprecation = "false" ? optimize = "false" ? failonerror = "true" > ??
- ???????????? < src ? path = "src" /> ??
- ???????????? < classpath ? refid = "classpath" /> ??
- ???????? </ javac > ??
- ???? </ target > ??
- ???? </ project > ??