Notepad ) - University Of Auckland

Transcription

Notepad wewillbeusingintheComputerSciencehttp://notepad- amsiscalledNotepad eNotepad suchassyntax- ‐colouring,auto- ‐indentationandbracehighlighting.Notepad pad ommandPromptbeforeyouinstallandconfigureNotepad .Notepad configurationinstructionsPage1

InstallingNotepad ces/anddownloadthezipfile,Notepad .zip, to your deronyourdesktop:Right- nistrator".Notepad einstalledNotepad houldappearNotepad configurationinstructionsPage2

ConfiguringNotepad Inthelabs,certaincommandsandshort- ribehowtoconfigureNotepad sothatthesamecommandsandshort- edinthelabs,goto:Settings (asintheexamplescreenshotbelow):Notepad configurationinstructionsPage3

Install:YouwillbepromptedtorestartNotepad .ClickYesandwaitforNotepad insmenu:Notepad configurationinstructionsPage4

ConfiguretheNppExecPlugin:GotoPlugins Follow (CURRENT DIRECTORY)"asshowninthescreenshotbelow:Short- ‐cutkeysDefinefunctionsandcorrespondingshort- oPlugins NppExec Execute.2.Choose“Cancel”ifaSaveFile dialogboxappears3.Enterthefollowingcommand:cd“ (CURRENT DIRECTORY)”javac (FILE NAME)asshownbelow:Notepad configurationinstructionsPage5

�:4.Savetwomorecommands:Onecalled“Run”:cd (CURRENT DIRECTORY)java (NAME PART)Notepad configurationinstructionsPage6

andanothercalled“CompileandRun”cd (CURRENT DIRECTORY)javac (FILE NAME)java (NAME PART)5.Definethescriptsfortheshort- etotheMacrossubmenu".Notepad configurationinstructionsPage7

ikewhenyouhaveaddedallthreescripts:Notepad configurationinstructionsPage8

tepad needstorestart.SelectOK,andcloseNotepad ,thenopenitagain.Notepad configurationinstructionsPage9

6.Finally,setuptheshort- ‐cutkeymappings:GotoSetting .Scrolldowntofindthescriptsyoudefined:Double- cutforthe“Compile”script.EnterCTRL 1asshownbelow:Notepad configurationinstructionsPage10

d:Compile:Run:CompileandRun:Ctrl 1Ctrl 2Ctrl efontfortheoutputwindow,gotoPlugins NppExec o12Notepad configurationinstructionsPage11

TestingtheconfigurationofNotepad TotestthattheNotepad codeintotheeditor:public class Test {public static void main(String[] args) {System.out.println("Hello Youshouldnowbeabletousetheshort- u)tocompileandrunyourprogram:Notepad configurationinstructionsPage12

outputappearintheconsolewindow:Notepad configurationinstructionsPage13

Notepad )configurationinstructions) Page5)) Configure)the)NppExec)Plugin:)))Go)to)Plugins) nsole)Command)History")